// Copyright Google Inc. All Rights Reserved.
(function () {
    'use strict';
    var h, ba = ba || {}, s = this,
        ca = function (a) {
            a = a.split(".");
            for (var b = s, c; c = a.shift();)
                if (null != b[c]) b = b[c];
                else return null;
            return b
        }, da = function () {}, ea = function (a) {
            var b = typeof a;
            if ("object" == b)
                if (a) {
                    if (a instanceof Array) return "array";
                    if (a instanceof Object) return b;
                    var c = Object.prototype.toString.call(a);
                    if ("[object Window]" == c) return "object";
                    if ("[object Array]" == c || "number" ==
                        typeof a.length &&
                        "undefined" != typeof a.splice &&
                        "undefined" !=
                        typeof a.propertyIsEnumerable && !a.propertyIsEnumerable(
                            "splice")) return "array";
                    if ("[object Function]" == c || "undefined" !=
                        typeof a
                        .call && "undefined" != typeof a.propertyIsEnumerable && !
                        a.propertyIsEnumerable("call")) return "function"
                }
                else return "null";
                else if ("function" == b && "undefined" == typeof a
                .call)
                return "object";
            return b
        }, fa = function (a) {
            var b = ea(a);
            return "array" == b || "object" == b && "number" ==
                typeof a.length
        }, u = function (a) {
            return "string" == typeof a
        }, ga = function (a) {
            return "number" == typeof a
        };
    Math.random();
    var ha = function (a, b, c) {
        return a.call.apply(a.bind, arguments)
    }, ia = function (a, b, c) {
            if (!a) throw Error();
            if (2 < arguments.length) {
                var d = Array.prototype.slice.call(arguments, 2);
                return function () {
                    var c = Array.prototype.slice.call(arguments);
                    Array.prototype.unshift.apply(c, d);
                    return a.apply(b, c)
                }
            }
            return function () {
                return a.apply(b, arguments)
            }
        }, ja = function (a, b, c) {
            ja = Function.prototype.bind && -1 != Function.prototype
                .bind.toString()
                .indexOf("native code") ? ha : ia;
            return ja.apply(null, arguments)
        }, ka = Date.now || function () {
            return +new Date
        },
        v = function (a, b) {
            var c = a.split("."),
                d = s;
            c[0] in d || !d.execScript || d.execScript("var " + c[
                0]);
            for (var e; c.length && (e = c.shift());) c.length ||
                void 0 ===
                b ? d = d[e] ? d[e] : d[e] = {} : d[e] = b
        }, w = function (a, b) {
            function c() {}
            c.prototype = b.prototype;
            a.A = b.prototype;
            a.prototype = new c;
            a.prototype.constructor = a;
            a.Jf = function (a, c, f) {
                return b.prototype[c].apply(a, Array.prototype.slice
                    .call(
                        arguments, 2))
            }
        };
    Function.prototype.bind = Function.prototype.bind || function (
        a, b) {
        if (1 < arguments.length) {
            var c = Array.prototype.slice.call(arguments, 1);
            c.unshift(this, a);
            return ja.apply(null, c)
        }
        return ja(this, a)
    };
    var la = function (a) {
        if (Error.captureStackTrace) Error.captureStackTrace(this,
            la);
        else {
            var b = Error()
                .stack;
            b && (this.stack = b)
        }
        a && (this.message = String(a))
    };
    w(la, Error);
    la.prototype.name = "CustomError";
    var na = function (a, b) {
        for (var c = a.split("%s"), d = "", e = Array.prototype.slice
                .call(
                    arguments, 1); e.length && 1 < c.length;) d +=
            c.shift() +
            e.shift();
        return d + c.join("%s")
    }, ua = function (a) {
            if (!oa.test(a)) return a; - 1 != a.indexOf("&") && (
                a = a.replace(
                    pa, "&amp;")); - 1 != a.indexOf("<") && (a =
                a.replace(qa,
                    "&lt;")); - 1 != a.indexOf(">") && (a = a.replace(
                ra,
                "&gt;")); - 1 != a.indexOf('"') && (a = a.replace(
                sa,
                "&quot;")); - 1 != a.indexOf("'") && (a = a.replace(
                ta,
                "&#39;"));
            return a
        }, pa = /&/g,
        qa = /</g,
        ra = />/g,
        sa = /"/g,
        ta = /'/g,
        oa = /[&<>"']/,
        x = function (a) {
            a =
                String(a);
            var b = a.indexOf("."); - 1 == b && (b = a.length);
            b = Math.max(0, 2 - b);
            return Array(b + 1)
                .join("0") + a
        }, va = function (a, b) {
            return a < b ? -1 : a > b ? 1 : 0
        };
    Math.random();
    var wa = function (a, b) {
        b.unshift(a);
        la.call(this, na.apply(null, b));
        b.shift()
    };
    w(wa, la);
    wa.prototype.name = "AssertionError";
    var xa = function (a, b) {
        throw new wa("Failure" + (a ? ": " + a : ""), Array.prototype
            .slice
            .call(arguments, 1));
    };
    var ya = function () {
        this.xe = ka()
    }, za = new ya;
    ya.prototype.set = function (a) {
        this.xe = a
    };
    ya.prototype.reset = function () {
        this.set(ka())
    };
    ya.prototype.get = function () {
        return this.xe
    };
    var Aa = function (a) {
        this.nf = a || "";
        this.of = za
    };
    h = Aa.prototype;
    h.pf = !0;
    h.oe = !0;
    h.rf = !0;
    h.qf = !0;
    h.pe = !1;
    h.sf = !1;
    var Ba = function (a) {
        return 10 > a ? "0" + a : String(a)
    }, Ca = function (a, b) {
            var c = (a.me - b) / 1E3,
                d = c.toFixed(3),
                e = 0;
            if (1 > c) e = 2;
            else
                for (; 100 > c;) e++, c *= 10;
            for (; 0 < e--;) d = " " + d;
            return d
        }, Da = function (a) {
            Aa.call(this, a)
        };
    w(Da, Aa);
    var Ea = Array.prototype,
        Fa = Ea.indexOf ? function (a, b, c) {
            return Ea.indexOf.call(a, b, c)
        } : function (a, b, c) {
            c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) :
                c;
            if (u(a)) return u(b) && 1 == b.length ? a.indexOf(b,
                c) : -1;
            for (; c < a.length; c++)
                if (c in a && a[c] === b) return c;
            return -1
        }, Ga = Ea.forEach ? function (a, b, c) {
            Ea.forEach.call(a, b, c)
        } : function (a, b, c) {
            for (var d = a.length, e = u(a) ? a.split("") : a, f =
                    0; f < d; f++)
                f in e && b.call(c, e[f], f, a)
        }, Ia = function (a) {
            var b;
            t: {
                b = Ha;
                for (var c = a.length, d = u(a) ? a.split("") : a,
                        e = 0; e <
                    c; e++)
                    if (e in d && b.call(void 0,
                        d[e], e, a)) {
                        b = e;
                        break t
                    }
                b = -1
            }
            return 0 > b ? null : u(a) ? a.charAt(b) : a[b]
        }, Ja = function (a) {
            return Ea.concat.apply(Ea, arguments)
        }, Ka = function (a) {
            var b = a.length;
            if (0 < b) {
                for (var c = Array(b), d = 0; d < b; d++) c[d] =
                    a[d];
                return c
            }
            return []
        };
    var La = "StopIteration" in s ? s.StopIteration : Error(
        "StopIteration"),
        Ma = function () {};
    Ma.prototype.next = function () {
        throw La;
    };
    Ma.prototype.Ff = function () {
        return this
    };
    var Na = function (a, b) {
        for (var c in a) b.call(void 0, a[c], c, a)
    }, Oa = function (a, b) {
            for (var c in a)
                if (b.call(void 0, a[c], c, a)) return !0;
            return !1
        }, Pa = function (a) {
            var b = [],
                c = 0,
                d;
            for (d in a) b[c++] = a[d];
            return b
        }, Qa = function (a) {
            var b = [],
                c = 0,
                d;
            for (d in a) b[c++] = d;
            return b
        }, Ra =
            "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf"
            .split(" "),
        Sa = function (a, b) {
            for (var c, d, e = 1; e < arguments.length; e++) {
                d = arguments[e];
                for (c in d) a[c] = d[c];
                for (var f = 0; f < Ra.length; f++) c = Ra[f],
                Object.prototype.hasOwnProperty.call(d, c) && (a[
                    c] = d[c])
            }
        };
    var y = function (a, b) {
        this.ga = {};
        this.B = [];
        this.Pb = this.q = 0;
        var c = arguments.length;
        if (1 < c) {
            if (c % 2) throw Error("Uneven number of arguments");
            for (var d = 0; d < c; d += 2) this.set(arguments[d],
                arguments[
                    d + 1])
        }
        else if (a) {
            a instanceof y ? (c = a.Sa(), d = a.pa()) : (c = Qa(a),
                d = Pa(
                    a));
            for (var e = 0; e < c.length; e++) this.set(c[e], d[e])
        }
    };
    h = y.prototype;
    h.Ta = function () {
        return this.q
    };
    h.pa = function () {
        Ta(this);
        for (var a = [], b = 0; b < this.B.length; b++) a.push(
            this.ga[this
                .B[b]]);
        return a
    };
    h.Sa = function () {
        Ta(this);
        return this.B.concat()
    };
    h.Qb = function (a) {
        return Ua(this.ga, a)
    };
    h.equals = function (a, b) {
        if (this === a) return !0;
        if (this.q != a.Ta()) return !1;
        var c = b || Va;
        Ta(this);
        for (var d, e = 0; d = this.B[e]; e++)
            if (!c(this.get(d), a.get(d))) return !1;
        return !0
    };
    var Va = function (a, b) {
        return a === b
    };
    y.prototype.rb = function () {
        return 0 == this.q
    };
    y.prototype.clear = function () {
        this.ga = {};
        this.Pb = this.q = this.B.length = 0
    };
    y.prototype.remove = function (a) {
        return Ua(this.ga, a) ? (delete this.ga[a], this.q--,
            this.Pb++,
            this.B.length > 2 * this.q && Ta(this), !0) : !1
    };
    var Ta = function (a) {
        if (a.q != a.B.length) {
            for (var b = 0, c = 0; b < a.B.length;) {
                var d = a.B[b];
                Ua(a.ga, d) && (a.B[c++] = d);
                b++
            }
            a.B.length = c
        }
        if (a.q != a.B.length) {
            for (var e = {}, c = b = 0; b < a.B.length;) d = a.B[
                b], Ua(e,
                d) || (a.B[c++] = d, e[d] = 1), b++;
            a.B.length = c
        }
    };
    y.prototype.get = function (a, b) {
        return Ua(this.ga, a) ? this.ga[a] : b
    };
    y.prototype.set = function (a, b) {
        Ua(this.ga, a) || (this.q++, this.B.push(a), this.Pb++);
        this.ga[a] = b
    };
    y.prototype.clone = function () {
        return new y(this)
    };
    y.prototype.Ff = function (a) {
        Ta(this);
        var b = 0,
            c = this.B,
            d = this.ga,
            e = this.Pb,
            f = this,
            g = new Ma;
        g.next = function () {
            for (;;) {
                if (e != f.Pb) throw Error(
                    "The map has changed since the iterator was created"
                );
                if (b >= c.length) throw La;
                var g = c[b++];
                return a ? g : d[g]
            }
        };
        return g
    };
    var Ua = function (a, b) {
        return Object.prototype.hasOwnProperty.call(a, b)
    };
    var Wa = function (a) {
        if ("function" == typeof a.pa) return a.pa();
        if (u(a)) return a.split("");
        if (fa(a)) {
            for (var b = [], c = a.length, d = 0; d < c; d++) b.push(
                a[d]);
            return b
        }
        return Pa(a)
    }, Xa = function (a, b, c) {
            if ("function" == typeof a.forEach) a.forEach(b, c);
            else if (fa(a) || u(a)) Ga(a, b, c);
            else {
                var d;
                if ("function" == typeof a.Sa) d = a.Sa();
                else if ("function" != typeof a.pa)
                    if (fa(a) || u(a)) {
                        d = [];
                        for (var e = a.length, f = 0; f < e; f++)
                            d.push(f)
                    }
                    else d = Qa(a);
                    else d = void 0;
                for (var e = Wa(a), f = e.length, g = 0; g < f; g++)
                    b.call(
                        c, e[g], d && d[g], a)
            }
        };
    var Ya, Za, $a, ab, bb = function () {
            return s.navigator ? s.navigator.userAgent : null
        };
    ab = $a = Za = Ya = !1;
    var cb;
    if (cb = bb()) {
        var db = s.navigator;
        Ya = 0 == cb.lastIndexOf("Opera", 0);
        Za = !Ya && (-1 != cb.indexOf("MSIE") || -1 != cb.indexOf(
            "Trident"));
        $a = !Ya && -1 != cb.indexOf("WebKit");
        ab = !Ya && !$a && !Za && "Gecko" == db.product
    }
    var eb = Ya,
        fb = Za,
        gb = ab,
        hb = $a,
        ib = function () {
            var a = s.document;
            return a ? a.documentMode : void 0
        }, jb;
    t: {
        var kb = "",
            lb;
        if (eb && s.opera) var mb = s.opera.version,
        kb = "function" == typeof mb ? mb() : mb;
        else if (gb ? lb = /rv\:([^\);]+)(\)|;)/ : fb ? lb =
            /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/ : hb && (lb =
                /WebKit\/(\S+)/), lb) var nb = lb.exec(bb()),
        kb = nb ? nb[1] : "";
        if (fb) {
            var ob = ib();
            if (ob > parseFloat(kb)) {
                jb = String(ob);
                break t
            }
        }
        jb = kb
    }
    var pb = jb,
        qb = {}, rb = function (a) {
            var b;
            if (!(b = qb[a])) {
                b = 0;
                for (var c = String(pb)
                    .replace(/^[\s\xa0]+|[\s\xa0]+$/g, "")
                    .split("."), d = String(a)
                        .replace(/^[\s\xa0]+|[\s\xa0]+$/g, "")
                        .split("."), e = Math.max(c.length, d.length),
                        f =
                        0; 0 == b && f < e; f++) {
                    var g = c[f] || "",
                        l = d[f] || "",
                        k = /(\d*)(\D*)/g,
                        m = /(\d*)(\D*)/g;
                    do {
                        var n = k.exec(g) || ["", "", ""],
                            r = m.exec(l) || ["", "", ""];
                        if (0 == n[0].length && 0 == r[0].length)
                            break;
                        b = va(0 == n[1].length ? 0 : parseInt(n[
                                1], 10), 0 ==
                            r[1].length ? 0 : parseInt(r[1], 10)) ||
                            va(0 ==
                                n[2].length, 0 == r[2].length) ||
                            va(n[2],
                                r[2])
                    } while (0 == b)
                }
                b = qb[a] = 0 <= b
            }
            return b
        }, sb = s.document,
        tb = sb && fb ? ib() || ("CSS1Compat" == sb.compatMode ?
            parseInt(
                pb, 10) : 5) : void 0;
    var vb = function (a) {
        return ub(a || arguments.callee.caller, [])
    }, ub = function (a, b) {
            var c = [];
            if (0 <= Fa(b, a)) c.push(
                "[...circular reference...]");
            else if (a && 50 > b.length) {
                c.push(wb(a) + "(");
                for (var d = a.arguments, e = 0; d && e < d.length; e++) {
                    0 < e && c.push(", ");
                    var f;
                    f = d[e];
                    switch (typeof f) {
                    case "object":
                        f = f ? "object" : "null";
                        break;
                    case "string":
                        break;
                    case "number":
                        f = String(f);
                        break;
                    case "boolean":
                        f = f ? "true" : "false";
                        break;
                    case "function":
                        f = (f = wb(f)) ? f : "[fn]";
                        break;
                    default:
                        f = typeof f
                    }
                    40 < f.length && (f = f.substr(0, 40) + "...");
                    c.push(f)
                }
                b.push(a);
                c.push(")\n");
                try {
                    c.push(ub(a.caller, b))
                }
                catch (g) {
                    c.push("[exception trying to get caller]\n")
                }
            }
            else a ? c.push("[...long stack...]") : c.push(
                "[end]");
            return c.join("")
        }, wb = function (a) {
            if (xb[a]) return xb[a];
            a = String(a);
            if (!xb[a]) {
                var b = /function ([^\(]+)/.exec(a);
                xb[a] = b ? b[1] : "[Anonymous]"
            }
            return xb[a]
        }, xb = {};
    var yb = function (a, b, c, d, e) {
        this.reset(a, b, c, d, e)
    };
    yb.prototype.ld = null;
    yb.prototype.kd = null;
    var zb = 0;
    yb.prototype.reset = function (a, b, c, d, e) {
        "number" == typeof e || zb++;
        this.me = d || ka();
        this.$a = a;
        this.yf = b;
        this.le = c;
        delete this.ld;
        delete this.kd
    };
    yb.prototype.pd = function () {
        return this.$a
    };
    yb.prototype.ud = function (a) {
        this.$a = a
    };
    yb.prototype.getMessage = function () {
        return this.yf
    };
    var Ab = function (a) {
        this.re = a;
        this.Ub = this.sd = this.$a = this.Gc = null
    }, A = function (a, b) {
            this.name = a;
            this.value = b
        };
    A.prototype.toString = function () {
        return this.name
    };
    var Bb = new A("SHOUT", 1200),
        Cb = new A("SEVERE", 1E3),
        Db = new A("WARNING", 900),
        Eb = new A("INFO", 800),
        Fb = new A("CONFIG", 700),
        Gb = new A("FINE", 500),
        Hb = [new A("OFF", Infinity), Bb, Cb, Db, Eb, Fb, Gb, new A(
            "FINER",
            400), new A("FINEST", 300), new A("ALL", 0)],
        Ib = null,
        Jb = function (a) {
            if (!Ib) {
                Ib = {};
                for (var b = 0, c; c = Hb[b]; b++) Ib[c.value] =
                    c, Ib[c.name] =
                    c
            }
            if (a in Ib) return Ib[a];
            for (b = 0; b < Hb.length; ++b)
                if (c = Hb[b], c.value <= a) return c;
            return null
        };
    h = Ab.prototype;
    h.getName = function () {
        return this.re
    };
    h.getParent = function () {
        return this.Gc
    };
    h.getChildren = function () {
        this.sd || (this.sd = {});
        return this.sd
    };
    h.ud = function (a) {
        this.$a = a
    };
    h.pd = function () {
        return this.$a
    };
    var Kb = function (a) {
        if (a.$a) return a.$a;
        if (a.Gc) return Kb(a.Gc);
        xa("Root logger has no level set.");
        return null
    };
    Ab.prototype.log = function (a, b, c) {
        if (a.value >= Kb(this)
            .value)
            for ("function" == ea(b) && (b = b()), a = this.Cf(a,
                    b, c), b =
                "log:" + a.getMessage(), s.console && (s.console.timeStamp ?
                    s.console.timeStamp(b) : s.console.markTimeline &&
                    s.console
                    .markTimeline(b)), s.msWriteProfilerMark && s
                .msWriteProfilerMark(
                    b), b = this; b;) {
                c = b;
                var d = a;
                if (c.Ub)
                    for (var e = 0, f = void 0; f = c.Ub[e]; e++)
                        f(d);
                b = b.getParent()
            }
    };
    Ab.prototype.Cf = function (a, b, c) {
        var d = new yb(a, String(b), this.re);
        if (c) {
            d.ld = c;
            var e;
            var f = arguments.callee.caller;
            try {
                var g;
                var l = ca("window.location.href");
                if (u(c)) g = {
                    message: c,
                    name: "Unknown error",
                    lineNumber: "Not available",
                    fileName: l,
                    stack: "Not available"
                };
                else {
                    var k, m, n = !1;
                    try {
                        k = c.lineNumber || c.Kf ||
                            "Not available"
                    }
                    catch (r) {
                        k = "Not available", n = !0
                    }
                    try {
                        m = c.fileName || c.filename || c.sourceURL ||
                            s.$googDebugFname ||
                            l
                    }
                    catch (p) {
                        m = "Not available", n = !0
                    }
                    g = !n && c.lineNumber && c.fileName && c.stack &&
                        c.message &&
                        c.name ? c : {
                            message: c.message || "Not available",
                            name: c.name || "UnknownError",
                            lineNumber: k,
                            fileName: m,
                            stack: c.stack || "Not available"
                    }
                }
                e = "Message: " + ua(g.message) +
                    '\nUrl: <a href="view-source:' + g.fileName +
                    '" target="_new">' + g.fileName +
                    "</a>\nLine: " + g.lineNumber +
                    "\n\nBrowser stack:\n" + ua(g.stack + "-> ") +
                    "[end]\n\nJS stack traversal:\n" + ua(vb(f) +
                        "-> ")
            }
            catch (q) {
                e =
                    "Exception trying to expose exception! You win, we lose. " +
                    q
            }
            d.kd = e
        }
        return d
    };
    Ab.prototype.info = function (a, b) {
        this.log(Eb, a, b)
    };
    Ab.prototype.config = function (a, b) {
        this.log(Fb, a, b)
    };
    var Lb = {}, Mb = null,
        Nb = function () {
            Mb || (Mb = new Ab(""), Lb[""] = Mb, Mb.ud(Fb))
        }, Ob = function () {
            Nb();
            return Mb
        }, B = function (a) {
            Nb();
            var b;
            if (!(b = Lb[a])) {
                b = new Ab(a);
                var c = a.lastIndexOf("."),
                    d = a.substr(c + 1),
                    c = B(a.substr(0, c));
                c.getChildren()[d] = b;
                b.Gc = c;
                Lb[a] = b
            }
            return b
        };
    var Pb = function () {
        this.vf = ja(this.xf, this);
        this.md = new Da;
        this.md.oe = !1;
        this.se = this.md.pe = !1;
        this.ne = "";
        this.lf = {}
    }, Rb = function () {
            var a = Qb;
            if (!0 != a.se) {
                var b = Ob(),
                    c = a.vf;
                b.Ub || (b.Ub = []);
                b.Ub.push(c);
                a.se = !0
            }
        };
    Pb.prototype.xf = function (a) {
        if (!this.lf[a.le]) {
            var b;
            b = this.md;
            var c = [];
            c.push(b.nf, " ");
            if (b.oe) {
                var d = new Date(a.me);
                c.push("[", Ba(d.getFullYear() - 2E3) + Ba(d.getMonth() +
                        1) +
                    Ba(d.getDate()) + " " + Ba(d.getHours()) +
                    ":" + Ba(d.getMinutes()) +
                    ":" + Ba(d.getSeconds()) + "." + Ba(Math.floor(
                        d.getMilliseconds() /
                        10)), "] ")
            }
            b.rf && c.push("[", Ca(a, b.of.get()), "s] ");
            b.qf && c.push("[", a.le, "] ");
            b.sf && c.push("[", a.pd()
                .name, "] ");
            c.push(a.getMessage());
            b.pe && a.ld && c.push("\n", a.kd);
            b.pf && c.push("\n");
            b = c.join("");
            if (c = Sb) switch (a.pd()) {
            case Bb:
                Tb(c,
                    "info", b);
                break;
            case Cb:
                Tb(c, "error", b);
                break;
            case Db:
                Tb(c, "warn", b);
                break;
            default:
                Tb(c, "debug", b)
            }
            else window.opera ? window.opera.postError(b) : this.ne +=
                b
        }
    };
    var Qb = null,
        Sb = window.console,
        Tb = function (a, b, c) {
            if (a[b]) a[b](c);
            else a.log(c)
        };
    var Ub;
    Ub = {
        Pf: ["BC", "AD"],
        Of: ["Before Christ", "Anno Domini"],
        Rf: "JFMAMJJASOND".split(""),
        Yf: "JFMAMJJASOND".split(""),
        Qf: "January February March April May June July August September October November December"
            .split(" "),
        Xf: "January February March April May June July August September October November December"
            .split(" "),
        Uf: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(
            " "),
        $f: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(
            " "),
        dg: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
            .split(
                " "),
        bg: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
            .split(
                " "),
        Wf: "Sun Mon Tue Wed Thu Fri Sat".split(" "),
        ag: "Sun Mon Tue Wed Thu Fri Sat".split(" "),
        Sf: "SMTWTFS".split(""),
        Zf: "SMTWTFS".split(""),
        Vf: ["Q1", "Q2", "Q3", "Q4"],
        Tf: ["1st quarter", "2nd quarter", "3rd quarter",
            "4th quarter"],
        Lf: ["AM", "PM"],
        Mf: ["EEEE, MMMM d, y", "MMMM d, y", "MMM d, y", "M/d/yy"],
        cg: ["h:mm:ss a zzzz", "h:mm:ss a z", "h:mm:ss a",
            "h:mm a"],
        Nf: ["{1} 'at' {0}", "{1} 'at' {0}", "{1}, {0}",
            "{1}, {0}"],
        Df: 6,
        eg: [5, 6],
        Ef: 5
    };
    var Vb =
        /^(-)?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/,
        Wb = function (a, b, c, d, e, f) {
            u(a) ? (this.X = "y" == a ? b : 0, this.W = "m" == a ?
                b : 0,
                this.Q = "d" == a ? b : 0, this.J = "h" == a ? b :
                0, this.K =
                "n" == a ? b : 0, this.L = "s" == a ? b : 0) : (
                this.X = a ||
                0, this.W = b || 0, this.Q = c || 0, this.J = d ||
                0, this.K =
                e || 0, this.L = f || 0)
        };
    Wb.prototype.Wb = function (a) {
        var b = Math.min(this.X, this.W, this.Q, this.J, this.K,
            this.L),
            c = Math.max(this.X, this.W, this.Q, this.J, this.K,
                this.L);
        if (0 > b && 0 < c) return null;
        if (!a && 0 == b && 0 == c) return "PT0S";
        c = [];
        0 > b && c.push("-");
        c.push("P");
        (this.X || a) && c.push(Math.abs(this.X) + "Y");
        (this.W || a) && c.push(Math.abs(this.W) + "M");
        (this.Q || a) && c.push(Math.abs(this.Q) + "D");
        if (this.J || this.K || this.L || a) c.push("T"), (this.J ||
            a) &&
            c.push(Math.abs(this.J) + "H"), (this.K || a) && c.push(
                Math.abs(
                    this.K) + "M"), (this.L || a) && c.push(Math.abs(
                    this.L) +
                "S");
        return c.join("")
    };
    Wb.prototype.equals = function (a) {
        return a.X == this.X && a.W == this.W && a.Q == this.Q &&
            a.J ==
            this.J && a.K == this.K && a.L == this.L
    };
    Wb.prototype.clone = function () {
        return new Wb(this.X, this.W, this.Q, this.J, this.K,
            this.L)
    };
    Wb.prototype.add = function (a) {
        this.X += a.X;
        this.W += a.W;
        this.Q += a.Q;
        this.J += a.J;
        this.K += a.K;
        this.L += a.L
    };
    var Zb = function (a, b, c) {
        ga(a) ? (this.e = Xb(a, b || 0, c || 1), Yb(this, c || 1)) :
            (b =
            typeof a, "object" == b && null != a || "function" ==
            b ? (this
                .e = Xb(a.getFullYear(), a.getMonth(), a.getDate()),
                Yb(
                    this, a.getDate())) : (this.e = new Date(ka()),
                this.e.setHours(
                    0), this.e.setMinutes(0), this.e.setSeconds(0),
                this.e.setMilliseconds(
                    0)))
    }, Xb = function (a, b, c) {
            b = new Date(a, b, c);
            0 <= a && 100 > a && b.setFullYear(b.getFullYear() -
                1900);
            return b
        };
    h = Zb.prototype;
    h.Ec = Ub.Df;
    h.Fc = Ub.Ef;
    h.clone = function () {
        var a = new Zb(this.e);
        a.Ec = this.Ec;
        a.Fc = this.Fc;
        return a
    };
    h.getFullYear = function () {
        return this.e.getFullYear()
    };
    h.getYear = function () {
        return this.getFullYear()
    };
    h.getMonth = function () {
        return this.e.getMonth()
    };
    h.getDate = function () {
        return this.e.getDate()
    };
    h.getTime = function () {
        return this.e.getTime()
    };
    h.getDay = function () {
        return this.e.getDay()
    };
    h.getUTCFullYear = function () {
        return this.e.getUTCFullYear()
    };
    h.getUTCMonth = function () {
        return this.e.getUTCMonth()
    };
    h.getUTCDate = function () {
        return this.e.getUTCDate()
    };
    h.getUTCDay = function () {
        return this.e.getDay()
    };
    h.getUTCHours = function () {
        return this.e.getUTCHours()
    };
    h.getUTCMinutes = function () {
        return this.e.getUTCMinutes()
    };
    h.getTimezoneOffset = function () {
        return this.e.getTimezoneOffset()
    };
    var $b = function (a) {
        a = a.getTimezoneOffset();
        if (0 == a) a = "Z";
        else {
            var b = Math.abs(a) / 60,
                c = Math.floor(b),
                b = 60 * (b - c);
            a = (0 < a ? "-" : "+") + x(c) + ":" + x(b)
        }
        return a
    };
    h = Zb.prototype;
    h.set = function (a) {
        this.e = new Date(a.getFullYear(), a.getMonth(), a.getDate())
    };
    h.setFullYear = function (a) {
        this.e.setFullYear(a)
    };
    h.setYear = function (a) {
        this.setFullYear(a)
    };
    h.setMonth = function (a) {
        this.e.setMonth(a)
    };
    h.setDate = function (a) {
        this.e.setDate(a)
    };
    h.setTime = function (a) {
        this.e.setTime(a)
    };
    h.setUTCFullYear = function (a) {
        this.e.setUTCFullYear(a)
    };
    h.setUTCMonth = function (a) {
        this.e.setUTCMonth(a)
    };
    h.setUTCDate = function (a) {
        this.e.setUTCDate(a)
    };
    h.add = function (a) {
        if (a.X || a.W) {
            var b = this.getMonth() + a.W + 12 * a.X,
                c = this.getYear() + Math.floor(b / 12),
                b = b % 12;
            0 > b && (b += 12);
            var d;
            t: {
                switch (b) {
                case 1:
                    d = 0 != c % 4 || 0 == c % 100 && 0 != c %
                        400 ? 28 :
                        29;
                    break t;
                case 5:
                case 8:
                case 10:
                case 3:
                    d = 30;
                    break t
                }
                d = 31
            }
            d = Math.min(d, this.getDate());
            this.setDate(1);
            this.setFullYear(c);
            this.setMonth(b);
            this.setDate(d)
        }
        a.Q && (a = new Date((new Date(this.getYear(), this.getMonth(),
                    this.getDate(), 12))
                .getTime() + 864E5 * a.Q), this.setDate(1), this.setFullYear(
                a.getFullYear()), this.setMonth(a.getMonth()),
            this.setDate(a.getDate()), Yb(this, a.getDate()))
    };
    h.Wb = function (a, b) {
        return [this.getFullYear(), x(this.getMonth() + 1), x(
            this.getDate())]
            .join(a ? "-" : "") + (b ? $b(this) : "")
    };
    h.equals = function (a) {
        return !(!a || this.getYear() != a.getYear() || this.getMonth() !=
            a.getMonth() || this.getDate() != a.getDate())
    };
    h.toString = function () {
        return this.Wb()
    };
    var Yb = function (a, b) {
        a.getDate() != b && a.e.setUTCHours(a.e.getUTCHours() + (
            a.getDate() <
            b ? 1 : -1))
    };
    Zb.prototype.valueOf = function () {
        return this.e.valueOf()
    };
    var ac = function (a, b, c, d, e, f, g) {
        this.e = ga(a) ? new Date(a, b || 0, c || 1, d || 0, e ||
            0, f || 0,
            g || 0) : new Date(a ? a.getTime() : ka())
    };
    w(ac, Zb);
    h = ac.prototype;
    h.getHours = function () {
        return this.e.getHours()
    };
    h.getMinutes = function () {
        return this.e.getMinutes()
    };
    h.getSeconds = function () {
        return this.e.getSeconds()
    };
    h.getMilliseconds = function () {
        return this.e.getMilliseconds()
    };
    h.getUTCDay = function () {
        return this.e.getUTCDay()
    };
    h.getUTCHours = function () {
        return this.e.getUTCHours()
    };
    h.getUTCMinutes = function () {
        return this.e.getUTCMinutes()
    };
    h.getUTCSeconds = function () {
        return this.e.getUTCSeconds()
    };
    h.getUTCMilliseconds = function () {
        return this.e.getUTCMilliseconds()
    };
    h.setHours = function (a) {
        this.e.setHours(a)
    };
    h.setMinutes = function (a) {
        this.e.setMinutes(a)
    };
    h.setSeconds = function (a) {
        this.e.setSeconds(a)
    };
    h.setMilliseconds = function (a) {
        this.e.setMilliseconds(a)
    };
    h.setUTCHours = function (a) {
        this.e.setUTCHours(a)
    };
    h.setUTCMinutes = function (a) {
        this.e.setUTCMinutes(a)
    };
    h.setUTCSeconds = function (a) {
        this.e.setUTCSeconds(a)
    };
    h.setUTCMilliseconds = function (a) {
        this.e.setUTCMilliseconds(a)
    };
    h.add = function (a) {
        Zb.prototype.add.call(this, a);
        a.J && this.setHours(this.e.getHours() + a.J);
        a.K && this.setMinutes(this.e.getMinutes() + a.K);
        a.L && this.setSeconds(this.e.getSeconds() + a.L)
    };
    h.Wb = function (a, b) {
        var c = Zb.prototype.Wb.call(this, a);
        return a ? c + " " + x(this.getHours()) + ":" + x(this.getMinutes()) +
            ":" + x(this.getSeconds()) + (b ? $b(this) : "") : c +
            "T" + x(
                this.getHours()) + x(this.getMinutes()) + x(this.getSeconds()) +
            (b ? $b(this) : "")
    };
    h.equals = function (a) {
        return this.getTime() == a.getTime()
    };
    h.toString = function () {
        return this.Wb()
    };
    h.clone = function () {
        var a = new ac(this.e);
        a.Ec = this.Ec;
        a.Fc = this.Fc;
        return a
    };
    var C = function () {};
    C.prototype.qd = !1;
    C.prototype.dispose = function () {
        this.qd || (this.qd = !0, this.r())
    };
    C.prototype.r = function () {
        if (this.we)
            for (; this.we.length;) this.we.shift()()
    };
    var bc = function (a, b) {
        a && a.log(Cb, b, void 0)
    }, D = function (a, b) {
            a && a.info(b, void 0)
        }, E = function (a, b) {
            a && a.log(Gb, b, void 0)
        };
    var cc = function (a, b) {
        this.type = a;
        this.currentTarget = this.target = b;
        this.defaultPrevented = this.cb = !1;
        this.qe = !0
    };
    cc.prototype.r = function () {};
    cc.prototype.dispose = function () {};
    cc.prototype.stopPropagation = function () {
        this.cb = !0
    };
    cc.prototype.preventDefault = function () {
        this.defaultPrevented = !0;
        this.qe = !1
    };
    var dc = function (a) {
        dc[" "](a);
        return a
    };
    dc[" "] = da;
    var ec;
    (ec = !fb) || (ec = fb && 9 <= tb);
    var fc = ec,
        gc = fb && !rb("9");
    !hb || rb("528");
    gb && rb("1.9b") || fb && rb("8") || eb && rb("9.5") || hb &&
        rb("528");
    gb && !rb("8") || fb && rb("9");
    var hc = function (a, b) {
        cc.call(this, a ? a.type : "");
        this.relatedTarget = this.currentTarget = this.target =
            null;
        this.charCode = this.keyCode = this.button = this.screenY =
            this.screenX =
            this.clientY = this.clientX = this.offsetY = this.offsetX =
            0;
        this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !
            1;
        this.Vb = this.state = null;
        a && this.init(a, b)
    };
    w(hc, cc);
    hc.prototype.init = function (a, b) {
        var c = this.type = a.type;
        this.target = a.target || a.srcElement;
        this.currentTarget = b;
        var d = a.relatedTarget;
        if (d) {
            if (gb) {
                var e;
                t: {
                    try {
                        dc(d.nodeName);
                        e = !0;
                        break t
                    }
                    catch (f) {}
                    e = !1
                }
                e || (d = null)
            }
        }
        else "mouseover" == c ? d = a.fromElement : "mouseout" ==
            c && (d =
                a.toElement);
        this.relatedTarget = d;
        this.offsetX = hb || void 0 !== a.offsetX ? a.offsetX : a
            .layerX;
        this.offsetY = hb || void 0 !== a.offsetY ? a.offsetY : a
            .layerY;
        this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX;
        this.clientY = void 0 !== a.clientY ? a.clientY :
            a.pageY;
        this.screenX = a.screenX || 0;
        this.screenY = a.screenY || 0;
        this.button = a.button;
        this.keyCode = a.keyCode || 0;
        this.charCode = a.charCode || ("keypress" == c ? a.keyCode :
            0);
        this.ctrlKey = a.ctrlKey;
        this.altKey = a.altKey;
        this.shiftKey = a.shiftKey;
        this.metaKey = a.metaKey;
        this.state = a.state;
        this.Vb = a;
        a.defaultPrevented && this.preventDefault()
    };
    hc.prototype.stopPropagation = function () {
        hc.A.stopPropagation.call(this);
        this.Vb.stopPropagation ? this.Vb.stopPropagation() :
            this.Vb.cancelBubble = !
            0
    };
    hc.prototype.preventDefault = function () {
        hc.A.preventDefault.call(this);
        var a = this.Vb;
        if (a.preventDefault) a.preventDefault();
        else if (a.returnValue = !1, gc) try {
            if (a.ctrlKey || 112 <= a.keyCode && 123 >= a.keyCode)
                a.keyCode = -
                    1
        }
        catch (b) {}
    };
    hc.prototype.r = function () {};
    var ic = "closure_listenable_" + (1E6 * Math.random() | 0),
        jc = function (a) {
            try {
                return !(!a || !a[ic])
            }
            catch (b) {
                return !1
            }
        }, kc = 0;
    var lc = function (a, b, c, d, e) {
        this.Ya = a;
        this.proxy = null;
        this.src = b;
        this.type = c;
        this.Sb = !! d;
        this.Dc = e;
        this.key = ++kc;
        this.removed = this.Cc = !1
    }, mc = function (a) {
            a.removed = !0;
            a.Ya = null;
            a.proxy = null;
            a.src = null;
            a.Dc = null
        };
    var nc = function (a) {
        this.src = a;
        this.F = {};
        this.Tb = 0
    };
    nc.prototype.add = function (a, b, c, d, e) {
        var f = a.toString();
        a = this.F[f];
        a || (a = this.F[f] = [], this.Tb++);
        var g = pc(a, b, d, e); - 1 < g ? (b = a[g], c || (b.Cc = !
            1)) : (b =
            new lc(b, this.src, f, !! d, e), b.Cc = c, a.push(b));
        return b
    };
    nc.prototype.remove = function (a, b, c, d) {
        a = a.toString();
        if (!(a in this.F)) return !1;
        var e = this.F[a];
        b = pc(e, b, c, d);
        return -1 < b ? (mc(e[b]), Ea.splice.call(e, b, 1), 0 ==
            e.length &&
            (delete this.F[a], this.Tb--), !0) : !1
    };
    var qc = function (a, b) {
        var c = b.type;
        if (c in a.F) {
            var d = a.F[c],
                e = Fa(d, b),
                f;
            (f = 0 <= e) && Ea.splice.call(d, e, 1);
            f && (mc(b), 0 == a.F[c].length && (delete a.F[c], a.Tb--))
        }
    };
    nc.prototype.removeAll = function (a) {
        a = a && a.toString();
        var b = 0,
            c;
        for (c in this.F)
            if (!a || c == a) {
                for (var d = this.F[c], e = 0; e < d.length; e++)++
                    b, mc(d[
                        e]);
                delete this.F[c];
                this.Tb--
            }
        return b
    };
    nc.prototype.td = function (a, b, c, d) {
        a = this.F[a.toString()];
        var e = -1;
        a && (e = pc(a, b, c, d));
        return -1 < e ? a[e] : null
    };
    nc.prototype.hasListener = function (a, b) {
        var c = void 0 !== a,
            d = c ? a.toString() : "",
            e = void 0 !== b;
        return Oa(this.F, function (a) {
            for (var g = 0; g < a.length; ++g)
                if (!(c && a[g].type != d || e && a[g].Sb !=
                    b)) return !
                    0;
            return !1
        })
    };
    var pc = function (a, b, c, d) {
        for (var e = 0; e < a.length; ++e) {
            var f = a[e];
            if (!f.removed && f.Ya == b && f.Sb == !! c && f.Dc ==
                d) return e
        }
        return -1
    };
    var rc = "closure_lm_" + (1E6 * Math.random() | 0),
        sc = {}, tc = 0,
        F = function (a, b, c, d, e) {
            if ("array" == ea(b))
                for (var f = 0; f < b.length; f++) F(a, b[f], c,
                    d, e);
            else if (c = uc(c), jc(a)) a.listen(b, c, d, e);
            else {
                if (!b) throw Error("Invalid event type");
                var f = !! d,
                    g = vc(a);
                g || (a[rc] = g = new nc(a));
                c = g.add(b, c, !1, d, e);
                c.proxy || (d = wc(), c.proxy = d, d.src = a, d.Ya =
                    c, a.addEventListener ?
                    a.addEventListener(b, d, f) : a.attachEvent(b in
                        sc ?
                        sc[b] : sc[b] = "on" + b, d), tc++)
            }
        }, wc = function () {
            var a = xc,
                b = fc ? function (c) {
                    return a.call(b.src, b.Ya, c)
                } : function (c) {
                    c =
                        a.call(b.src, b.Ya, c);
                    if (!c) return c
                };
            return b
        }, G = function (a, b, c, d, e) {
            if ("array" == ea(b))
                for (var f = 0; f < b.length; f++) G(a, b[f], c,
                    d, e);
            else c = uc(c), jc(a) ? a.za.remove(String(b), c, d,
                e) : a &&
                (a = vc(a)) && (b = a.td(b, c, !! d, e)) && yc(b)
        }, yc = function (a) {
            if (!ga(a) && a && !a.removed) {
                var b = a.src;
                if (jc(b)) qc(b.za, a);
                else {
                    var c = a.type,
                        d = a.proxy;
                    b.removeEventListener ? b.removeEventListener(
                        c, d, a.Sb) :
                        b.detachEvent && b.detachEvent(c in sc ?
                            sc[c] : sc[
                                c] = "on" + c, d);
                    tc--;
                    (c = vc(b)) ? (qc(c, a), 0 == c.Tb && (c.src =
                        null, b[
                            rc] = null)) : mc(a)
                }
            }
        },
        Ac = function (a, b, c, d) {
            var e = 1;
            if (a = vc(a))
                if (b = a.F[b])
                    for (b = Ka(b), a = 0; a < b.length; a++) {
                        var f = b[a];
                        f && f.Sb == c && !f.removed && (e &= !1 !==
                            zc(f,
                                d))
                    }
            return Boolean(e)
        }, zc = function (a, b) {
            var c = a.Ya,
                d = a.Dc || a.src;
            a.Cc && yc(a);
            return c.call(d, b)
        }, xc = function (a, b) {
            if (a.removed) return !0;
            if (!fc) {
                var c = b || ca("window.event"),
                    d = new hc(c, this),
                    e = !0;
                if (!(0 > c.keyCode || void 0 != c.returnValue)) {
                    t: {
                        var f = !1;
                        if (0 == c.keyCode) try {
                            c.keyCode = -1;
                            break t
                        }
                        catch (g) {
                            f = !0
                        }
                        if (f || void 0 == c.returnValue) c.returnValue = !
                            0
                    }
                    c = [];
                    for (f = d.currentTarget; f; f =
                        f.parentNode) c.push(f);
                    for (var f = a.type, l = c.length - 1; !d.cb &&
                        0 <= l; l--)
                        d.currentTarget = c[l], e &= Ac(c[l], f, !
                            0, d);
                    for (l = 0; !d.cb && l < c.length; l++) d.currentTarget =
                        c[l], e &= Ac(c[l], f, !1, d)
                }
                return e
            }
            return zc(a, new hc(b, this))
        }, vc = function (a) {
            a = a[rc];
            return a instanceof nc ? a : null
        }, Bc = "__closure_events_fn_" + (1E9 * Math.random() >>>
            0),
        uc = function (a) {
            return "function" == ea(a) ? a : a[Bc] || (a[Bc] =
                function (b) {
                    return a.handleEvent(b)
                })
        };
    var Cc = function () {
        this.za = new nc(this);
        this.zf = this
    };
    w(Cc, C);
    Cc.prototype[ic] = !0;
    h = Cc.prototype;
    h.nd = null;
    h.addEventListener = function (a, b, c, d) {
        F(this, a, b, c, d)
    };
    h.removeEventListener = function (a, b, c, d) {
        G(this, a, b, c, d)
    };
    h.dispatchEvent = function (a) {
        var b, c = this.nd;
        if (c)
            for (b = []; c; c = c.nd) b.push(c);
        var c = this.zf,
            d = a.type || a;
        if (u(a)) a = new cc(a, c);
        else if (a instanceof cc) a.target = a.target || c;
        else {
            var e = a;
            a = new cc(d, c);
            Sa(a, e)
        }
        var e = !0,
            f;
        if (b)
            for (var g = b.length - 1; !a.cb && 0 <= g; g--) f =
                a.currentTarget =
                b[g], e = Dc(f, d, !0, a) && e;
        a.cb || (f = a.currentTarget = c, e = Dc(f, d, !0, a) &&
            e, a.cb ||
            (e = Dc(f, d, !1, a) && e));
        if (b)
            for (g = 0; !a.cb && g < b.length; g++) f = a.currentTarget =
                b[
                    g], e = Dc(f, d, !1, a) && e;
        return e
    };
    h.r = function () {
        Cc.A.r.call(this);
        this.za && this.za.removeAll(void 0);
        this.nd = null
    };
    h.listen = function (a, b, c, d) {
        return this.za.add(String(a), b, !1, c, d)
    };
    var Dc = function (a, b, c, d) {
        b = a.za.F[String(b)];
        if (!b) return !0;
        b = Ka(b);
        for (var e = !0, f = 0; f < b.length; ++f) {
            var g = b[f];
            if (g && !g.removed && g.Sb == c) {
                var l = g.Ya,
                    k = g.Dc || g.src;
                g.Cc && qc(a.za, g);
                e = !1 !== l.call(k, d) && e
            }
        }
        return e && !1 != d.qe
    };
    Cc.prototype.td = function (a, b, c, d) {
        return this.za.td(String(a), b, c, d)
    };
    Cc.prototype.hasListener = function (a, b) {
        return this.za.hasListener(void 0 !== a ? String(a) :
            void 0, b)
    };
    var Ec = function (a, b, c) {
        if ("function" == ea(a)) c && (a = ja(a, c));
        else if (a && "function" == typeof a.handleEvent) a = ja(
            a.handleEvent,
            a);
        else throw Error("Invalid listener argument");
        return 2147483647 < b ? -1 : s.setTimeout(a, b || 0)
    };
    var Fc = RegExp(
        "^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"
    ),
        Hc = function (a) {
            if (Gc) {
                Gc = !1;
                var b = s.location;
                if (b) {
                    var c = b.href;
                    if (c && (c = (c = Hc(c)[3] || null) &&
                        decodeURIComponent(c)) && c != b.hostname)
                        throw Gc = !
                            0, Error();
                }
            }
            return a.match(Fc)
        }, Gc = hb;
    var Ic = function () {};
    Ic.prototype.te = null;
    var Kc = function (a) {
        var b;
        (b = a.te) || (b = {}, Jc(a) && (b[0] = !0, b[1] = !0), b =
            a.te =
            b);
        return b
    };
    var Lc, Mc = function () {};
    w(Mc, Ic);
    var Nc = function (a) {
        return (a = Jc(a)) ? new ActiveXObject(a) : new XMLHttpRequest
    }, Jc = function (a) {
            if (!a.ve && "undefined" == typeof XMLHttpRequest &&
                "undefined" != typeof ActiveXObject) {
                for (var b = ["MSXML2.XMLHTTP.6.0",
                        "MSXML2.XMLHTTP.3.0",
                        "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], c = 0; c <
                    b.length; c++) {
                    var d = b[c];
                    try {
                        return new ActiveXObject(d), a.ve = d
                    }
                    catch (e) {}
                }
                throw Error(
                    "Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed"
                );
            }
            return a.ve
        };
    Lc = new Mc;
    var H = function (a) {
        Cc.call(this);
        this.headers = new y;
        this.sc = a || null;
        this.Ia = !1;
        this.mc = this.k = null;
        this.Pd = this.nc = "";
        this.Da = 0;
        this.Kb = "";
        this.Va = this.Zc = this.jc = this.cd = !1;
        this.ra = 0;
        this.pc = null;
        this.Lb = "";
        this.qc = this.xb = !1
    };
    w(H, Cc);
    H.prototype.a = B("goog.net.XhrIo");
    var Oc = /^https?$/i,
        Pc = ["POST", "PUT"],
        Qc = function (a) {
            a.Lb = "arraybuffer"
        };
    H.prototype.send = function (a, b, c, d) {
        if (this.k) throw Error(
            "[goog.net.XhrIo] Object is active with another request=" +
            this.nc + "; newUri=" + a);
        b = b ? b.toUpperCase() : "GET";
        this.nc = a;
        this.Kb = "";
        this.Da = 0;
        this.Pd = b;
        this.cd = !1;
        this.Ia = !0;
        this.k = this.Yc();
        this.mc = this.sc ? Kc(this.sc) : Kc(Lc);
        this.k.onreadystatechange = ja(this.Ud, this);
        try {
            E(this.a, Rc(this, "Opening Xhr")), this.Zc = !0,
                this.k.open(b,
                    String(a), !0), this.Zc = !1
        }
        catch (e) {
            E(this.a, Rc(this, "Error opening Xhr: " + e.message));
            Sc(this, e);
            return
        }
        a = c || "";
        var f =
            this.headers.clone();
        d && Xa(d, function (a, b) {
            f.set(b, a)
        });
        d = Ia(f.Sa());
        c = s.FormData && a instanceof s.FormData;
        !(0 <= Fa(Pc, b)) || d || c || f.set("Content-Type",
            "application/x-www-form-urlencoded;charset=utf-8");
        Xa(f, function (a, b) {
            this.k.setRequestHeader(b, a)
        }, this);
        this.Lb && (this.k.responseType = this.Lb);
        "withCredentials" in this.k && (this.k.withCredentials =
            this.xb);
        try {
            Tc(this), 0 < this.ra && (this.qc = Uc(this.k), E(
                    this.a, Rc(
                        this, "Will abort after " + this.ra +
                        "ms if incomplete, xhr2 " + this.qc)),
                this.qc ? (this.k
                    .timeout =
                    this.ra, this.k.ontimeout = ja(this.o, this)) :
                this.pc =
                Ec(this.o, this.ra, this)), E(this.a, Rc(this,
                "Sending request")), this.jc = !0, this.k.send(a),
                this.jc = !
                1
        }
        catch (g) {
            E(this.a, Rc(this, "Send error: " + g.message)), Sc(
                this, g)
        }
    };
    var Uc = function (a) {
        return fb && rb(9) && ga(a.timeout) && void 0 !== a.ontimeout
    }, Ha = function (a) {
            return "content-type" == a.toLowerCase()
        };
    H.prototype.Yc = function () {
        return this.sc ? Nc(this.sc) : Nc(Lc)
    };
    H.prototype.o = function () {
        "undefined" != typeof ba && this.k && (this.Kb =
            "Timed out after " +
            this.ra + "ms, aborting", this.Da = 8, E(this.a, Rc(
                this, this.Kb)),
            this.dispatchEvent("timeout"), this.abort(8))
    };
    var Sc = function (a, b) {
        a.Ia = !1;
        a.k && (a.Va = !0, a.k.abort(), a.Va = !1);
        a.Kb = b;
        a.Da = 5;
        Vc(a);
        Wc(a)
    }, Vc = function (a) {
            a.cd || (a.cd = !0, a.dispatchEvent("complete"), a.dispatchEvent(
                "error"))
        };
    H.prototype.abort = function (a) {
        this.k && this.Ia && (E(this.a, Rc(this, "Aborting")),
            this.Ia = !1,
            this.Va = !0, this.k.abort(), this.Va = !1, this.Da =
            a || 7,
            this.dispatchEvent("complete"), this.dispatchEvent(
                "abort"), Wc(
                this))
    };
    H.prototype.r = function () {
        this.k && (this.Ia && (this.Ia = !1, this.Va = !0, this.k
            .abort(),
            this.Va = !1), Wc(this, !0));
        H.A.r.call(this)
    };
    H.prototype.Ud = function () {
        this.qd || (this.Zc || this.jc || this.Va ? Xc(this) :
            this.Af())
    };
    H.prototype.Af = function () {
        Xc(this)
    };
    var Xc = function (a) {
        if (a.Ia && "undefined" != typeof ba)
            if (a.mc[1] && 4 == Yc(a) && 2 == Zc(a)) E(a.a, Rc(a,
                "Local request error detected and ignored"));
            else if (a.jc && 4 == Yc(a)) Ec(a.Ud, 0, a);
        else if (a.dispatchEvent("readystatechange"), 4 == Yc(a)) {
            E(a.a, Rc(a, "Request complete"));
            a.Ia = !1;
            try {
                var b = Zc(a),
                    c, d;
                t: switch (b) {
                case 200:
                case 201:
                case 202:
                case 204:
                case 206:
                case 304:
                case 1223:
                    d = !0;
                    break t;
                default:
                    d = !1
                }
                if (!(c = d)) {
                    var e;
                    if (e = 0 === b) {
                        var f = Hc(String(a.nc))[1] || null;
                        if (!f && self.location) var g = self.location
                            .protocol,
                        f = g.substr(0, g.length - 1);
                        e = !Oc.test(f ? f.toLowerCase() : "")
                    }
                    c = e
                }
                if (c) a.dispatchEvent("complete"), a.dispatchEvent(
                    "success");
                else {
                    a.Da = 6;
                    var l;
                    try {
                        l = 2 < Yc(a) ? a.k.statusText : ""
                    }
                    catch (k) {
                        E(a.a, "Can not get status: " + k.message),
                            l = ""
                    }
                    a.Kb = l + " [" + Zc(a) + "]";
                    Vc(a)
                }
            }
            finally {
                Wc(a)
            }
        }
    }, Wc = function (a, b) {
            if (a.k) {
                Tc(a);
                var c = a.k,
                    d = a.mc[0] ? da : null;
                a.k = null;
                a.mc = null;
                b || a.dispatchEvent("ready");
                try {
                    c.onreadystatechange = d
                }
                catch (e) {
                    bc(a.a,
                        "Problem encountered resetting onreadystatechange: " +
                        e.message)
                }
            }
        }, Tc = function (a) {
            a.k &&
                a.qc && (a.k.ontimeout = null);
            ga(a.pc) && (s.clearTimeout(a.pc), a.pc = null)
        }, Yc = function (a) {
            return a.k ? a.k.readyState : 0
        }, Zc = function (a) {
            try {
                return 2 < Yc(a) ? a.k.status : -1
            }
            catch (b) {
                return -1
            }
        }, $c = function (a) {
            try {
                if (!a.k) return null;
                if ("response" in a.k) return a.k.response;
                switch (a.Lb) {
                case "":
                case "text":
                    return a.k.responseText;
                case "arraybuffer":
                    if ("mozResponseArrayBuffer" in a.k) return a
                        .k.mozResponseArrayBuffer
                }
                bc(a.a, "Response type " + a.Lb +
                    " is not supported on this browser");
                return null
            }
            catch (b) {
                return E(a.a,
                    "Can not get response: " + b.message), null
            }
        };
    H.prototype.getResponseHeader = function (a) {
        return this.k && 4 == Yc(this) ? this.k.getResponseHeader(
            a) : void 0
    };
    H.prototype.getAllResponseHeaders = function () {
        return this.k && 4 == Yc(this) ? this.k.getAllResponseHeaders() :
            ""
    };
    var Rc = function (a, b) {
        return b + " [" + a.Pd + " " + a.nc + " " + Zc(a) + "]"
    };
    var ad = function () {
        this.la = this.ha = 0;
        this.fa = []
    }, bd = function (a) {
            if (a.ha != a.la) {
                var b = a.fa[a.ha];
                delete a.fa[a.ha];
                a.ha++;
                return b
            }
        }, cd = function (a) {
            return a.ha == a.la ? void 0 : a.fa[a.ha]
        };
    h = ad.prototype;
    h.Ta = function () {
        return this.la - this.ha
    };
    h.rb = function () {
        return 0 == this.la - this.ha
    };
    h.clear = function () {
        this.la = this.ha = this.fa.length = 0
    };
    h.contains = function (a) {
        return 0 <= Fa(this.fa, a)
    };
    h.remove = function (a) {
        a = Fa(this.fa, a);
        if (0 > a) return !1;
        a == this.ha ? bd(this) : (Ea.splice.call(this.fa, a, 1),
            this.la--);
        return !0
    };
    h.pa = function () {
        return this.fa.slice(this.ha, this.la)
    };
    var I = function (a, b) {
        var c;
        if (a instanceof I) this.ba = void 0 !== b ? b : a.ba, dd(
            this, a.Na),
        c = a.Xa, J(this), this.Xa = c, c = a.Ba, J(this), this.Ba =
            c,
        ed(this, a.wb), c = a.qa, J(this), this.qa = c, fd(this,
            a.Aa.clone()),
        c = a.Wa, J(this), this.Wa = c;
        else if (a && (c = Hc(String(a)))) {
            this.ba = !! b;
            dd(this, c[1] || "", !0);
            var d = c[2] || "";
            J(this);
            this.Xa = gd(d);
            d = c[3] || "";
            J(this);
            this.Ba = gd(d);
            ed(this, c[4]);
            d = c[5] || "";
            J(this);
            this.qa = gd(d);
            fd(this, c[6] || "", !0);
            c = c[7] || "";
            J(this);
            this.Wa = gd(c)
        }
        else this.ba = !! b, this.Aa = new hd(null, 0, this.ba)
    };
    h = I.prototype;
    h.Na = "";
    h.Xa = "";
    h.Ba = "";
    h.wb = null;
    h.qa = "";
    h.Wa = "";
    h.Hf = !1;
    h.ba = !1;
    h.toString = function () {
        var a = [],
            b = this.Na;
        b && a.push(id(b, jd), ":");
        if (b = this.Ba) {
            a.push("//");
            var c = this.Xa;
            c && a.push(id(c, jd), "@");
            a.push(encodeURIComponent(String(b)));
            b = this.wb;
            null != b && a.push(":", String(b))
        }
        if (b = this.qa) this.Ba && "/" != b.charAt(0) && a.push(
            "/"), a.push(
            id(b, "/" == b.charAt(0) ? kd : ld));
        (b = this.Aa.toString()) && a.push("?", b);
        (b = this.Wa) && a.push("#", id(b, md));
        return a.join("")
    };
    var nd = function (a, b) {
        var c = a.clone(),
            d = !! b.Na;
        d ? dd(c, b.Na) : d = !! b.Xa;
        if (d) {
            var e = b.Xa;
            J(c);
            c.Xa = e
        }
        else d = !! b.Ba;
        d ? (e = b.Ba, J(c), c.Ba = e) : d = null != b.wb;
        e = b.qa;
        if (d) ed(c, b.wb);
        else if (d = !! b.qa) {
            if ("/" != e.charAt(0))
                if (a.Ba && !a.qa) e = "/" + e;
                else {
                    var f = c.qa.lastIndexOf("/"); - 1 != f && (e =
                        c.qa.substr(
                            0, f + 1) + e)
                }
            f = e;
            if (".." == f || "." == f) e = "";
            else if (-1 != f.indexOf("./") || -1 != f.indexOf(
                "/.")) {
                for (var e = 0 == f.lastIndexOf("/", 0), f = f.split(
                            "/"),
                        g = [], l = 0; l < f.length;) {
                    var k = f[l++];
                    "." == k ? e && l == f.length && g.push("") :
                        ".." == k ?
                        ((1 <
                            g.length || 1 == g.length && "" != g[
                                0]) && g.pop(),
                        e && l == f.length && g.push("")) : (g.push(
                                k), e = !
                            0)
                }
                e = g.join("/")
            }
            else e = f
        }
        d ? (J(c), c.qa = e) : d = "" !== b.Aa.toString();
        d ? fd(c, gd(b.Aa.toString())) : d = !! b.Wa;
        d && (d = b.Wa, J(c), c.Wa = d);
        return c
    };
    I.prototype.clone = function () {
        return new I(this)
    };
    var dd = function (a, b, c) {
        J(a);
        a.Na = c ? gd(b) : b;
        a.Na && (a.Na = a.Na.replace(/:$/, ""))
    }, ed = function (a, b) {
            J(a);
            if (b) {
                b = Number(b);
                if (isNaN(b) || 0 > b) throw Error(
                    "Bad port number " + b);
                a.wb = b
            }
            else a.wb = null
        }, fd = function (a, b, c) {
            J(a);
            b instanceof hd ? (a.Aa = b, a.Aa.rd(a.ba)) : (c || (
                b = id(b,
                    od)), a.Aa = new hd(b, 0, a.ba))
        }, J = function (a) {
            if (a.Hf) throw Error(
                "Tried to modify a read-only Uri");
        };
    I.prototype.rd = function (a) {
        this.ba = a;
        this.Aa && this.Aa.rd(a);
        return this
    };
    var pd = function (a) {
        return a instanceof I ? a.clone() : new I(a, void 0)
    }, qd = function (a, b) {
            a instanceof I || (a = pd(a));
            b instanceof I || (b = pd(b));
            return nd(a, b)
        }, gd = function (a) {
            return a ? decodeURIComponent(a) : ""
        }, id = function (a, b) {
            return u(a) ? encodeURI(a)
                .replace(b, rd) : null
        }, rd = function (a) {
            a = a.charCodeAt(0);
            return "%" + (a >> 4 & 15)
                .toString(16) + (a & 15)
                .toString(16)
        }, jd = /[#\/\?@]/g,
        ld = /[\#\?:]/g,
        kd = /[\#\?]/g,
        od = /[\#\?@]/g,
        md = /#/g,
        hd = function (a, b, c) {
            this.U = a || null;
            this.ba = !! c
        }, td = function (a) {
            if (!a.s && (a.s = new y, a.q =
                0, a.U))
                for (var b = a.U.split("&"), c = 0; c < b.length; c++) {
                    var d = b[c].indexOf("="),
                        e = null,
                        f = null;
                    0 <= d ? (e = b[c].substring(0, d), f = b[c].substring(
                        d + 1)) : e = b[c];
                    e = decodeURIComponent(e.replace(/\+/g, " "));
                    e = sd(a, e);
                    a.add(e, f ? decodeURIComponent(f.replace(
                            /\+/g, " ")) :
                        "")
                }
        };
    h = hd.prototype;
    h.s = null;
    h.q = null;
    h.Ta = function () {
        td(this);
        return this.q
    };
    h.add = function (a, b) {
        td(this);
        this.U = null;
        a = sd(this, a);
        var c = this.s.get(a);
        c || this.s.set(a, c = []);
        c.push(b);
        this.q++;
        return this
    };
    h.remove = function (a) {
        td(this);
        a = sd(this, a);
        return this.s.Qb(a) ? (this.U = null, this.q -= this.s.get(
                a)
            .length, this.s.remove(a)) : !1
    };
    h.clear = function () {
        this.s = this.U = null;
        this.q = 0
    };
    h.rb = function () {
        td(this);
        return 0 == this.q
    };
    h.Qb = function (a) {
        td(this);
        a = sd(this, a);
        return this.s.Qb(a)
    };
    h.Sa = function () {
        td(this);
        for (var a = this.s.pa(), b = this.s.Sa(), c = [], d = 0; d <
            b.length; d++)
            for (var e = a[d], f = 0; f < e.length; f++) c.push(b[
                d]);
        return c
    };
    h.pa = function (a) {
        td(this);
        var b = [];
        if (u(a)) this.Qb(a) && (b = Ja(b, this.s.get(sd(this, a))));
        else {
            a = this.s.pa();
            for (var c = 0; c < a.length; c++) b = Ja(b, a[c])
        }
        return b
    };
    h.set = function (a, b) {
        td(this);
        this.U = null;
        a = sd(this, a);
        this.Qb(a) && (this.q -= this.s.get(a)
            .length);
        this.s.set(a, [b]);
        this.q++;
        return this
    };
    h.get = function (a, b) {
        var c = a ? this.pa(a) : [];
        return 0 < c.length ? String(c[0]) : b
    };
    h.toString = function () {
        if (this.U) return this.U;
        if (!this.s) return "";
        for (var a = [], b = this.s.Sa(), c = 0; c < b.length; c++)
            for (var d = b[c], e = encodeURIComponent(String(d)),
                    d = this.pa(
                        d), f = 0; f < d.length; f++) {
                var g = e;
                "" !== d[f] && (g += "=" + encodeURIComponent(
                    String(d[f])));
                a.push(g)
            }
        return this.U = a.join("&")
    };
    h.clone = function () {
        var a = new hd;
        a.U = this.U;
        this.s && (a.s = this.s.clone(), a.q = this.q);
        return a
    };
    var sd = function (a, b) {
        var c = String(b);
        a.ba && (c = c.toLowerCase());
        return c
    };
    hd.prototype.rd = function (a) {
        a && !this.ba && (td(this), this.U = null, Xa(this.s,
            function (a,
                c) {
                var d = c.toLowerCase();
                c != d && (this.remove(c), this.remove(d), 0 <
                    a.length &&
                    (this.U = null, this.s.set(sd(this, d),
                            Ka(a)),
                        this.q += a.length))
            }, this));
        this.ba = a
    };
    hd.prototype.extend = function (a) {
        for (var b = 0; b < arguments.length; b++) Xa(arguments[b],
            function (a, b) {
                this.add(b, a)
            }, this)
    };
    v("cast.player.api.HlsSegmentFormat", {
        MPEG2_TS: 0,
        MPEG_AUDIO_ES: 1
    });
    v("cast.player.api.VERSION", "0.3.0");
    v("cast.player.api.LoggerLevel", {
        DEBUG: 0,
        INFO: 800,
        ERROR: 1E3,
        NONE: Infinity
    });
    var ud = function (a) {
        Ob()
            .ud(Jb(a))
    };
    v("cast.player.api.setLoggerLevel", ud);
    Qb || (Qb = new Pb); - 1 != window.location.href.indexOf(
        "Debug=true") &&
        Rb();
    Rb();
    ud(1E3);
    var K = function () {
        this.timeoutInterval = 3E4;
        this.headers = this.url = null;
        this.withCredentials = !1;
        this.protectionSystem = this.content = null
    };
    v("cast.player.api.RequestInfo", K);
    K.prototype.timeoutInterval = K.prototype.timeoutInterval;
    K.prototype.url = K.prototype.url;
    K.prototype.headers = K.prototype.headers;
    K.prototype.withCredentials = K.prototype.withCredentials;
    K.prototype.content = K.prototype.content;
    K.prototype.protectionSystem = K.prototype.protectionSystem;
    var L = function (a, b, c) {
        this.url = a;
        this.errorCode = b;
        this.status = c
    };
    v("cast.player.api.RequestStatus", L);
    L.prototype.url = L.prototype.url;
    L.prototype.errorCode = L.prototype.errorCode;
    L.prototype.status = L.prototype.status;
    var vd = function (a, b, c, d) {
        this.codecs = a;
        this.mimeType = b;
        this.bitrates = c;
        this.language = d || null
    };
    v("cast.player.api.StreamInfo", vd);
    vd.prototype.codecs = K.prototype.codecs;
    vd.prototype.mimeType = K.prototype.mimeType;
    vd.prototype.bitrates = K.prototype.bitrates;
    vd.prototype.language = K.prototype.language;
    v("cast.player.api.ErrorCode", {
        MANIFEST: 0,
        PLAYBACK: 1,
        MEDIAKEYS: 2,
        NETWORK: 3
    });
    var M = function (a) {
        this.initialBandwidth = 2097152;
        this.url = a.url;
        this.licenseUrl = a.licenseUrl;
        this.licenseCustomData = a.licenseCustomData || null;
        this.g = a.mediaElement || null;
        this.onError = this.Lc;
        this.updateManifestRequestInfo = this.jf;
        this.updateLicenseRequestInfo = this.hf;
        this.updateSegmentRequestInfo = this.kf;
        this.updateCaptionsRequestInfo = this.gf;
        this.getLicenseCustomData = this.$e;
        this.trackBandwidth = this.ff;
        this.getQualityLevel = this.bf;
        this.getMediaElement = this.af;
        this.prepareLicenseRequest = this.cf;
        this.processMetadata =
            this.ef;
        this.processLicense = this.df
    };
    v("cast.player.api.Host", M);
    M.prototype.onError = M.prototype.onError;
    M.prototype.updateManifestRequestInfo = M.prototype.updateManifestRequestInfo;
    M.prototype.updateLicenseRequestInfo = M.prototype.updateLicenseRequestInfo;
    M.prototype.updateSegmentRequestInfo = M.prototype.updateSegmentRequestInfo;
    M.prototype.updateCaptionsRequestInfo = M.prototype.updateCaptionsRequestInfo;
    M.prototype.getLicenseCustomData = M.prototype.getLicenseCustomData;
    M.prototype.trackBandwidth = M.prototype.trackBandwidth;
    M.prototype.getQualityLevel = M.prototype.getQualityLevel;
    M.prototype.getMediaElement = M.prototype.getMediaElement;
    M.prototype.prepareLicenseRequest = M.prototype.prepareLicenseRequest;
    M.prototype.processMetadata = M.prototype.processMetadata;
    M.prototype.processLicense = M.prototype.processLicense;
    h = M.prototype;
    h.Lc = function () {};
    h.jf = function (a) {
        a.url || (a.url = this.url)
    };
    h.hf = function (a) {
        this.licenseUrl && (a.url = this.licenseUrl)
    };
    h.kf = function () {};
    h.gf = function () {};
    h.$e = function () {
        return this.licenseCustomData
    };
    h.ff = function () {};
    h.bf = function (a, b) {
        return b
    };
    h.af = function () {
        return this.g
    };
    h.cf = function () {
        return !0
    };
    h.ef = function () {};
    h.df = function (a) {
        return a
    };
    var N = function (a, b) {
        this.name = a;
        this.value = null;
        this.V = b || null;
        this.parse = function (a) {
            this.value = this.V ? this.V(a) : parseInt(a, 10)
        }
    }, O = function (a, b, c) {
            this.name = a;
            this.value = c || null;
            this.V = b || null;
            this.parse = function (a) {
                this.value = this.V ? this.V(a) : a
            }
        }, wd = function () {
            this.name = "IsLive";
            this.value = null;
            this.parse = function (a) {
                this.value = "true" === a.toLowerCase()
            }
        }, P = function (a, b) {
            for (var c in b)
                if (b.hasOwnProperty(c)) {
                    var d = b[c],
                        e = a.getNamedItem(d.name);
                    null !== e && d.parse(e.value)
                }
        }, Q = function () {
            this.Ea =
                this.xc = null;
            this.Z = 0;
            this.hd = null;
            this.c = new H;
            F(this.c, "success", this.Ca, !1, this);
            F(this.c, "error", this.R, !1, this);
            F(this.c, "timeout", this.Xe, !1, this);
            F(this.c, "ready", this.be, !1, this)
        };
    w(Q, C);
    Q.prototype.r = function () {
        G(this.c, "success", this.Ca, !1, this);
        G(this.c, "error", this.R, !1, this);
        G(this.c, "timeout", this.R, !1, this);
        G(this.c, "ready", this.be, !1, this);
        this.c.dispose();
        Q.A.r.call(this)
    };
    Q.prototype.load = function (a, b) {
        this.xc = b;
        this.Ea = a.url;
        this.hd = a.headers;
        this.c.xb = a.withCredentials;
        this.c.ra = Math.max(0, a.timeoutInterval);
        this.Z = 0;
        this.c.send(this.Ea, void 0, void 0, this.hd)
    };
    Q.prototype.abort = function () {
        this.c.abort()
    };
    var xd = function (a) {
        return new L(a.Ea, a.c.Da, Zc(a.c))
    };
    Q.prototype.Ca = function (a) {
        this.xc.bb($c(a.target))
    };
    Q.prototype.R = function () {
        this.xc.bb(null)
    };
    Q.prototype.Xe = function () {
        this.Z++;
        3 < this.Z && this.xc.bb(null)
    };
    Q.prototype.be = function () {
        0 < this.Z && this.c.send(this.Ea, void 0, void 0, this.hd)
    };
    var yd = function () {};
    v("cast.player.common.ManifestReadyCallback", yd);
    yd.prototype.hb = function () {};
    var zd = function () {};
    v("cast.player.common.PlaylistReadyCallback", zd);
    zd.prototype.Pa = function () {};
    var R = function (a) {
        this.host = a;
        this.uri = null;
        this.G = !1;
        this.duration = -1;
        this.l = [];
        this.ob = new Q;
        this.gd = this.xa = this.Ja = null;
        this.P = new K
    }, Ad = function (a, b) {
            return nd(a.uri, new I(b))
                .toString()
        };
    R.prototype.va = function () {
        this.ob.dispose()
    };
    R.prototype.load = function (a, b, c) {
        this.host.updateManifestRequestInfo(this.P);
        this.uri = new I(this.P.url);
        this.gd = c;
        this.Ja = a;
        this.xa = b
    };
    R.prototype.getStreamCount = function () {
        return this.l.length
    };
    v(
        "cast.player.common.StreamingProtocol.prototype.getStreamCount",
        R.prototype
        .getStreamCount);
    R.prototype.enableStream = function (a, b) {
        this.l[a].enabled = b
    };
    v(
        "cast.player.common.StreamingProtocol.prototype.enableStream",
        R.prototype
        .enableStream);
    R.prototype.isStreamEnabled = function (a) {
        return this.l[a].enabled
    };
    v(
        "cast.player.common.StreamingProtocol.prototype.isStreamEnabled",
        R.prototype
        .isStreamEnabled);
    R.prototype.$d = function (a, b, c) {
        a = this.l[a];
        a.N = b;
        3 !== a.type && (a.aa = !0);
        c.Nb()
    };
    R.prototype.getQualityLevel = function (a, b) {
        var c = this.l[a];
        if (void 0 === b) return c.N;
        for (var d = 0, e = Number.MAX_VALUE, f = 0; f < c.m.length; f++) {
            var g = c.m[f];
            b >= g.u && (g = b - g.u, g < e && (d = f, e = g))
        }
        return d
    };
    v(
        "cast.player.common.StreamingProtocol.prototype.getQualityLevel",
        R.prototype
        .getQualityLevel);
    R.prototype.getStreamInfo = function (a) {
        a = this.l[a];
        for (var b = [], c = 0; c < a.m.length; c++) b.push(a.m[c]
            .u);
        return new vd(a.codecs, a.mimeType, b, a.lang)
    };
    v(
        "cast.player.common.StreamingProtocol.prototype.getStreamInfo",
        R.prototype
        .getStreamInfo);
    var Bd = function (a) {
        for (var b = !1, c = !1, d = 0; d < a.l.length; d++) {
            var e = a.l[d];
            1 === e.type && (b ? e.enabled = !1 : b = e.enabled = !
                0);
            2 === e.type && (c ? e.enabled = !1 : c = e.enabled = !
                0)
        }
    };
    h = R.prototype;
    h.ad = function () {
        return null
    };
    h.updateLicenseRequestInfo = function () {};
    h.Ac = function () {
        return this.duration
    };
    h.seek = function (a, b) {
        var c = this.l[a],
            d = c.m[c.N].i;
        b -= c.Y;
        for (var e = d.length - 1; 0 <= e; e--)
            if (b >= d[e].time) return c.index = 0 < e ? e - 1 :
                0, !0;
        c.index = -1;
        return !1
    };
    h.hc = function (a) {
        a = this.l[a];
        var b = a.index + 1;
        return b < a.m[a.N].i.length ? (a.index = b, !0) : !1
    };
    h.lb = function (a) {
        var b = this.l[a];
        a = b.index;
        b = b.m[b.N].i;
        return !this.G && a === b.length - 1
    };
    h.wc = function (a) {
        a = this.l[a];
        var b = a.N;
        if (0 <= b) {
            var c = a.index;
            if (0 <= c && (b = a.m[b].i, 0 < b.length)) return {
                time: b[c].time + a.Y,
                duration: b[c].duration
            }
        }
        return {
            time: 0,
            duration: 0
        }
    };
    h.clear = function (a) {
        a = this.l[a];
        3 !== a.type && (a.aa = !0);
        a.index = -1
    };
    h.Td = function (a) {
        return this.l[a].aa
    };
    h.dd = function () {
        return null
    };
    h.updateSegmentRequestInfo = function () {};
    h.yc = function () {};
    h.Sd = function () {
        return !0
    };
    var Cd = function (a) {
        for (var b = new Uint8Array(a.length), c = 0; c < a.length; c++)
            b[
                c] = a.charCodeAt(c);
        return b
    };
    var S = function (a, b, c) {
        a.set(c, b);
        return b + c.length
    }, T = function (a, b, c, d, e, f) {
            for (var g = c, l = c, k = 0; 4 > k; k++) a.setUint8(
                c + 4 + k,
                d.charCodeAt(k));
            c = e(a, b, l + 8, f);
            a.setUint32(g, c - g);
            return c
        }, U = function (a, b, c, d, e) {
            return T(a, b, c, d, function (a, b, c) {
                return S(b, c, e)
            })
        }, Dd = function (a, b, c, d) {
            return T(a, b, c, "esds", function (a, b, c, d) {
                return S(b, c, [0, 0, 0, 0, 3, 25, 0, 1, 0, 4,
                    17, d.vd,
                    21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, d.ua[
                        0], d.ua[1], 6, 1, 2])
            }, d)
        }, Ed = function (a, b, c, d) {
            return T(a, b, c, "avcC", function (a, b, c, d) {
                c = S(b, c, [1, 77, 64, 30, 255,
225]);
                a.setUint16(c, d.kb.length);
                c = S(b, c + 2, d.kb);
                a.setUint8(c, 1);
                c += 1;
                a.setUint16(c, d.Eb.length);
                c += 2;
                return c = S(b, c, d.Eb)
            }, d)
        }, Fd = function (a, b, c, d, e, f) {
            return T(a, b, c, "traf", function (a, b, c) {
                var m = c;
                c = U(a, b, c, "tfhd", [0, 0, 0, 8, 0, 0, 0,
                    1, 0, 0, 0,
                    0]);
                a.setUint32(m + 16, d);
                m = c;
                c = U(a, b, c, "tfdt", [0, 0, 0, 0, 0, 0, 0,
                    0]);
                a.setUint32(m + 12, e);
                m = c;
                c = U(a, b, c, "trun", [0, 0, 2, 1]);
                a.setUint32(c, f.length);
                for (c = c + 4 + 4; 0 < f.length;) b = f.shift(),
                    a.setUint32(
                        c, b), c += 4;
                a.setUint32(m, c - m);
                return c
            })
        }, Gd = function (a, b, c) {
            for (var d = c - b +
                1, e = 0, f = b; f < b + d / 2; f++) e = a[f], a[
                f] = a[c -
                f + b], a[c - f + b] = e
        }, Hd = function (a, b, c, d) {
            return T(a, b, c, "tenc", function (a, b, c, d) {
                c = S(b, c, [0, 0, 0, 0, 0, 0, 1]);
                a.setUint8(c, d.t.Oc);
                c++;
                a = d.t.Gb;
                d = new ArrayBuffer(a.length);
                d = new Uint8Array(d);
                d.set(a);
                Gd(d, 0, 3);
                Gd(d, 4, 5);
                Gd(d, 6, 7);
                return c = S(b, c, d)
            }, d)
        }, Id = function (a, b, c, d) {
            return T(a, b, c, "schi", function (a, b, c, d) {
                d && (c = Hd(a, b, c, d));
                return c
            }, d)
        }, Jd = function (a, b, c, d) {
            return T(a, b, c, "sinf", function (a, b, c) {
                c = 2 === d.type ? U(a, b, c, "frma", [97,
                    118, 99, 49]) :
                    U(a, b, c, "frma", [109,
112, 52, 97]);
                c = U(a, b, c, "schm", [0, 0, 0, 0, 99, 101,
                    110, 99, 0,
                    1, 0, 0]);
                return c = Id(a, b, c, d)
            }, d)
        }, Kd = function (a, b, c, d, e) {
            return T(a, b, c, d, function (a, b, c, e) {
                c = S(b, c, [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
                    0, 0, 0,
                    0, 0, 0, 2, 0, 16, 0, 0, 0, 0, e.ja >> 8 & 255,
                    e.ja & 255, 0, 0]);
                c = Dd(a, b, c, e);
                "enca" === d && (c = Jd(a, b, c, e));
                return c
            }, e)
        }, Ld = function (a, b, c, d, e) {
            return T(a, b, c, d, function (a, b, c, e) {
                c = S(b, c, [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
                    0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
                a.setUint16(c, e.width);
                c += 2;
                a.setUint16(c, e.height);
                c = S(b, c + 2, [0, 72, 0, 0, 0, 72, 0, 0, 0,
                    0, 0, 0,
                    0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0,
                    0, 0, 0, 0, 24, 255, 255]);
                c = Ed(a, b, c, e);
                "encv" === d && (c = Jd(a, b, c, e));
                return c
            }, e)
        }, Md = function (a, b, c, d) {
            return T(a, b, c, "stsd", function (a, b, c, d) {
                c = S(b, c, [0, 0, 0, 0, 0, 0, 0, 1]);
                2 === d.type ? (d.t && (c = Ld(a, b, c,
                        "encv", d)), c =
                    Ld(a, b, c, "avc1", d)) : (d.t && (c = Kd(
                    a, b, c,
                    "enca", d)), c = Kd(a, b, c, "mp4a",
                    d));
                return c
            }, d)
        }, Nd = function (a, b, c, d) {
            return T(a, b, c, "stbl", function (a, b, c, l) {
                l && (c = Md(a, b, c, d), c = 2 === l.type ?
                    S(b, c, [0,
                    0, 0, 16, 115, 116, 116, 115, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 16, 115, 116,
115, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 115, 116, 99, 111, 0, 0,
                        0, 0, 0,
                    0, 0, 0, 0, 0, 0, 20, 115, 116, 115, 122, 0,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    16, 115, 116, 115, 115, 0, 0, 0, 0, 0, 0, 0,
                    0]) : S(b, c, [0, 0, 0, 16, 115, 116, 116, 115,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 115,
                    116, 115, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 16, 115, 116, 99, 111, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 20, 115, 116, 115, 122, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));
                return c
            }, d)
        }, Od = function (a, b, c) {
            return T(a, b, c, "dref", function (a, b, c) {
                c = S(b, c, [0, 0, 0, 0, 0, 0, 0, 1]);
                return U(a, b, c, "url ", [0, 0, 0, 1])
            })
        }, Pd = function (a, b, c) {
            return T(a, b,
                c, "dinf", function (a, b, c) {
                    return Od(a, b, c)
                })
        }, Qd = function (a, b, c, d) {
            return T(a, b, c, "minf", function (a, b, c, l) {
                if (l) return c = Pd(a, b, c), c = Nd(a, b, c,
                    d), c =
                    2 === l.type ? U(a, b, c, "vmhd", [0, 0,
                        0, 1, 0, 0,
                        0, 0, 0, 0, 0, 0]) : U(a, b, c, "smhd", [0, 0,
                        0, 0, 0, 0, 0, 0])
            }, d)
        }, Rd = function (a, b, c, d) {
            return T(a, b, c, "mdia", function (a, b, c, d) {
                if (d) {
                    var k = c;
                    c = U(a, b, c, "mdhd", [0, 0, 0, 0, 204,
                        96, 118,
                        241, 204, 96, 118, 241, 0, 0, 0, 0, 0, 0, 0,
                        0, 85, 196, 0, 0]);
                    a.setUint32(k + 20, 1E7);
                    c = 2 === d.type ? U(a, b, c, "hdlr", [0,
                        0, 0, 0,
                        0, 0, 0, 0, 118, 105, 100, 101, 0, 0, 0, 0,
                        0, 0, 0, 0, 0, 0,
0, 0, 86, 105, 100, 101, 111, 72, 97, 110, 100, 108, 101, 114, 0]) :
                        U(a, b, c,
                            "hdlr", [0, 0, 0, 0, 0, 0, 0, 0,
                                115, 111, 117,
                            110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                83,
                            111, 117, 110, 100, 72, 97, 110, 100, 108,
                            101, 114, 0]);
                    return c = Qd(a, b, c, d)
                }
            }, d)
        }, Sd = function (a, b, c, d) {
            return T(a, b, c, "tkhd", function (a, b, c, d) {
                c = S(b, c, [0, 0, 0, 3, 204, 96, 118, 241,
                    204, 96,
                    118, 241, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,
                    0, 0, 0]);
                a.setUint32(c, d.width);
                c += 4;
                a.setUint32(c, d.height);
                c += 4;
                a.setUint16(c,
                    0);
                return c + 2
            }, d)
        }, Td = function (a, b, c, d) {
            return T(a, b, c, "trak", function (a, b, c, d) {
                d && (c = Sd(a, b, c, d), c = Rd(a, b, c, d));
                return c
            }, d)
        }, Ud = function (a, b, c) {
            return T(a, b, c, "mvex", function (a, b, c) {
                return c = U(a, b, c, "trex", [0, 0, 0, 0, 0,
                    0, 0, 1,
                    0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
            })
        }, Vd = function (a, b, c, d) {
            return T(a, b, c, "pssh", function (a, b, c, d) {
                c = S(b, c, [0, 0, 0, 0]);
                c = S(b, c, d.t.systemId);
                a.setUint32(c, d.t.Ha.length);
                return c = S(b, c + 4, d.t.Ha)
            }, d)
        }, Wd = function (a, b, c) {
            return T(a, b, 0, "moov", function (a, b, c, g) {
                c = U(a, b, c, "mvhd", [0,
0, 0, 0, 204, 96, 118, 241, 204, 96, 118, 241, 0, 152, 150, 128, 0, 0,
                    0, 0, 0,
                    1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2]);
                g.t && (c = Vd(a, b, c, g));
                c = Ud(a, b, c);
                return c = Td(a, b, c, g)
            }, c)
        }, V = function (a, b, c) {
            for (var d = 0, e = 0; 4 > e; e++) d <<= 8, d += c.charCodeAt(
                e);
            for (; b < a.byteLength && a.getUint32(b + 4, !1) !=
                d;) b += a
                .getUint32(b);
            return b
        }, Xd = function (a, b, c, d) {
            b = V(a, b, c);
            c = a.getUint32(b);
            a.setUint32(b, c + d);
            return b
        }, Yd =
            function (a, b, c, d, e) {
                return T(a, b, c, "mdat", function (a, b, c) {
                    c = S(b, c, d);
                    return c = S(b, c, e)
                })
        }, Zd = function (a, b, c) {
            return T(a, b, c, "saio", function (a, b, c) {
                c = S(b, c, [0, 0, 0, 0, 0, 0, 0, 1]);
                a.setUint32(c, c + 4 + 8);
                return c + 4
            })
        }, $d = function (a, b, c, d, e, f) {
            return T(a, b, c, "saiz", function (a, b, c) {
                c = f ? S(b, c, [0, 0, 0, 0, 0]) : S(b, c, [0,
                    0, 0, 0,
                    8]);
                a.setUint32(c, d);
                c += 4;
                b.set(e, c);
                return c += e.length
            })
        }, ae = function (a) {
            var b = new ArrayBuffer(2E4),
                c = new DataView(b),
                d = new Uint8Array(b);
            a = Wd(c, d, a);
            b = new DataView(b, 0, a);
            a = 0;
            for (c = b.byteLength ?
                b.byteLength : b.buffer.byteLength; a < c;) {
                d = b.getUint32(a + 4, !1);
                if (1936286840 == d || 1836019558 == d) break;
                a += b.getUint32(a, !1)
            }
            return new Uint8Array(b.buffer, 0, a)
        };
    var be = function (a, b, c, d) {
        this.a = B("cast.player.core.MediaKeySession");
        this.f = a;
        this.h = b;
        this.Bb = d;
        this.yd = this.Ke.bind(this);
        this.Ga = c;
        this.Kd = "";
        this.cc = this.Mc = this.g = this.Jd = null;
        this.c = new H;
        Qc(this.c);
        F(this.c, "success", this.Ca, !1, this);
        F(this.c, "error", this.R, !1, this);
        F(this.c, "timeout", this.R, !1, this);
        this.xd = this.Je.bind(this);
        this.o = null
    };
    w(be, C);
    var ce = {
        clearkey: "webkit-org.w3.clearkey",
        widevine: "com.widevine.alpha",
        playready: "com.microsoft.playready"
    }, de = function (a) {
            D(a.a, "createSession");
            a.g = a.f.getMediaElement();
            a.g.addEventListener("webkitkeymessage", a.yd, !1);
            a.g.addEventListener("webkitkeyerror", a.xd, !1);
            var b = null,
                c, d = a.h.getStreamCount();
            for (c = 0; c < d; c++) {
                var e = a.h.getStreamInfo(c);
                0 === e.mimeType.indexOf("video") && (b = e.mimeType)
            }
            if (b) {
                d = a.h.ad();
                for (c = 0; c < d.length; c++)
                    if (e = ce[d[c]], a.g.canPlayType(b, e)) {
                        a.Mc = d[c];
                        a.cc = e;
                        break
                    }
                if ("clearkey" ===
                    a.Mc)
                    for (b = new ArrayBuffer(a.Ga.length), (new Uint8Array(
                            b))
                        .set(a.Ga), d = new DataView(b), c = 0; c <
                        b.byteLength;
                    ) {
                        e = d.getUint32(c, !1);
                        d.getUint32(c + 4, !1);
                        if (1477738184 === d.getUint32(c + 12, !1) &&
                            69420633 === d.getUint32(c + 16, !1) &&
                            2464609580 === d.getUint32(c + 20, !1) &&
                            1558758348 === d.getUint32(c + 24, !1)
                        ) {
                            d = d.getUint32(c + 28, !1);
                            a.Ga = new Uint8Array(b.slice(c + 32,
                                c + 32 +
                                d));
                            break
                        }
                        c += e
                    }
            }
            if (a.cc) {
                if (c = a.f.getLicenseCustomData()) {
                    d = new ArrayBuffer(a.Ga.length + 24 + c.length);
                    b = new Uint8Array(d);
                    e = new DataView(d);
                    for (d = 0; d < a.Ga.length; d++) b[d] =
                        a.Ga[d];
                    e.setUint32(d, 24 + c.length);
                    d += 4;
                    b[d++] = 117;
                    b[d++] = 117;
                    b[d++] = 105;
                    b[d++] = 100;
                    for (var f = [43, 248, 102, 128, 198, 229, 78,
                            36, 190,
                            35, 15, 129, 90, 96, 110, 178], e = 0; 16 >
                        e; ++
                        e) b[d++] = f[e];
                    for (e = 0; e < c.length; ++e) b[d++] = c.charCodeAt(
                        e)
                }
                else b = a.Ga;
                a.g.webkitGenerateKeyRequest(a.cc, b);
                a.o = setTimeout(a.Me.bind(a), 6E4)
            }
            else a.Bb.nb(a, !1)
        };
    h = be.prototype;
    h.Me = function () {
        D(this.a, "onTimeout_");
        this.Bb.nb(this, !0);
        this.o = null
    };
    h.r = function () {
        this.g && (this.g.removeEventListener("webkitkeymessage",
            this.yd, !
            1), this.g.removeEventListener("webkitkeyerror",
            this.xd, !
            1));
        G(this.c, "success", this.Ca, !1, this);
        G(this.c, "error", this.R, !1, this);
        G(this.c, "timeout", this.R, !1, this);
        this.c.dispose();
        null !== this.o && (clearTimeout(this.o), this.o = null);
        this.f = null;
        be.A.r.call(this)
    };
    h.Ca = function (a) {
        D(this.a, "onXhrSuccess_");
        a = $c(a.target);
        a = new Uint8Array(a);
        a = this.f.processLicense(a);
        this.g.webkitAddKey(this.cc, a, this.Ga, this.Kd);
        this.Bb.nb(this, !0)
    };
    h.R = function () {
        D(this.a, "onXhrError_");
        this.Bb.nb(this, !1)
    };
    h.Ke = function (a) {
        D(this.a, "onKeyMessage_");
        this.f && (null !== this.o && (clearTimeout(this.o), this
                .o = null),
            this.Kd = a.sessionId, this.Jd = a.message, this.f.prepareLicenseRequest() &&
            this.tb())
    };
    h.Je = function () {
        D(this.a, "onKeyError_");
        this.f && this.Bb.nb(this, !1)
    };
    h.tb = function () {
        var a = new K;
        a.timeoutInterval = 18E4;
        a.protectionSystem = this.Mc;
        a.content = this.Jd;
        this.h.updateLicenseRequestInfo(a);
        this.f.updateLicenseRequestInfo(a);
        this.c.xb = a.withCredentials;
        this.c.ra = Math.max(0, a.timeoutInterval);
        this.c.send(a.url, "POST", a.content, a.headers)
    };
    var ee = function () {};
    v("cast.player.core.KeySessionEndedCallback", ee);
    ee.prototype.nb = function () {};
    var fe = function (a, b) {
        this.a = B("cast.player.core.MediaKeysManager");
        this.f = a;
        this.h = b;
        this.oa = new ad;
        this.Qd = this.Te.bind(this);
        this.g = this.f.getMediaElement();
        this.g.addEventListener("webkitneedkey", this.Qd, !1)
    };
    w(fe, C);
    h = fe.prototype;
    h.r = function () {
        this.g.removeEventListener("webkitneedkey", this.Qd, !1);
        this.reset();
        fe.A.r.call(this)
    };
    h.reset = function () {
        Xa(this.oa, function (a) {
            a.dispose()
        });
        this.oa.clear()
    };
    h.nb = function (a, b) {
        bd(this.oa);
        a.dispose();
        D(this.a, "onKeySessionEnded: " + this.oa.Ta());
        if (b) this.oa.rb() || (a = cd(this.oa), de(a));
        else this.f.onError(2)
    };
    h.Te = function (a) {
        D(this.a, "onNeedKey");
        a = new be(this.f, this.h, a.initData, this);
        var b = this.oa;
        b.fa[b.la++] = a;
        D(this.a, "onNeedKey_: " + this.oa.Ta());
        1 == this.oa.Ta() && de(a)
    };
    h.tb = function () {
        cd(this.oa)
            .tb()
    };
    var ge = function (a, b, c, d) {
        this.a = B("cast.player.core.QualityManager");
        this.f = a;
        this.h = b;
        this.n = c;
        this.fb = d;
        this.ia = b.getQualityLevel(this.n, a.initialBandwidth);
        this.Yb = this.Zb = this.gb = this.bc = this.ac = 0;
        this.fc = !1
    };
    ge.prototype.Nb = function () {
        this.fc = !1;
        this.fb.Nb()
    };
    var he = function (a) {
        var b = !1;
        if (3 <= a.Yb) {
            var c = 0.7 * Math.min(a.ac, a.bc);
            D(a.a, a.n + ": bitrate " + c);
            a.ia = a.h.getQualityLevel(a.n, c);
            a.Yb = 0
        }
        c = a.h.getQualityLevel(a.n);
        a.ia = a.f.getQualityLevel(a.n, a.ia);
        c !== a.ia && (D(a.a, a.n + ": from " + c + " to " + a.ia),
            a.fc = !
            0, a.h.$d(a.n, a.ia, a), b = !0);
        return b
    };
    var ie = function (a, b, c, d) {
        this.a = B("cast.player.core.SourceBufferManager");
        this.sa = a;
        this.p = d;
        this.n = c;
        this.h = b;
        this.kc = this.oc = !1;
        this.wa = new ad;
        a = this.h.getStreamInfo(this.n);
        this.ma = this.p.addSourceBuffer(a.mimeType +
            '; codecs="' + a.codecs +
            '"');
        this.Rd = this.Ue.bind(this);
        this.ma.addEventListener("updateend", this.Rd, !1)
    };
    w(ie, C);
    h = ie.prototype;
    h.r = function () {
        this.wa.clear();
        this.ma.removeEventListener("updateend", this.Rd, !1);
        "closed" !== this.p.readyState && this.p.removeSourceBuffer(
            this.ma);
        ie.A.r.call(this)
    };
    h.abort = function () {
        if (this.wa.rb()) this.oc = !0;
        else {
            var a = this.wa;
            a.fa[a.la++] = {
                abort: !0,
                data: null,
                Y: 0
            }
        }
    };
    h.clear = function () {
        this.wa.clear();
        "open" === this.p.readyState && this.ma.abort()
    };
    h.updating = function () {
        return this.kc
    };
    h.ub = function () {
        return this.ma
    };
    h.Ue = function () {
        for (var a = this.ma.buffered, b = 0; b < a.length; b++) D(
            this.a,
            this.n + ": " + a.start(b) + " - " + a.end(b));
        D(this.a, this.n + ": updateend");
        for (this.kc = !1; !this.wa.rb();)
            if (a = bd(this.wa), a.abort) this.oc = !0;
            else if (a.data) {
            je(this, a.data, a.Y);
            break
        }
    };
    var je = function (a, b, c) {
        if (a.ma.timestampOffset != c || a.oc) a.oc = !1, D(a.a,
            "abort"),
        a.ma.abort(), a.ma.timestampOffset = c;
        D(a.a, a.n + ": append");
        a.ma.appendBuffer(b);
        a.kc = !0;
        a.sa.de(b, c)
    };
    ie.prototype.append = function (a, b) {
        if (this.kc || !this.wa.rb()) {
            var c = this.wa,
                d = {
                    data: a,
                    Y: b,
                    abort: !1
                };
            c.fa[c.la++] = d;
            D(this.a, this.n + ": deferred " + this.wa.Ta())
        }
        else je(this, a, b)
    };
    var ke = function () {
        this.ue = 24
    }, le = function (a, b) {
            for (var c = 0; c < a.length; c++)
                if (a[c].nodeName === b) return a[c];
            return null
        }, me = function (a, b) {
            var c = b.split(":"),
                d = 3600 * parseInt(c[0], 10) + 60 * parseInt(c[1],
                    10) +
                    parseFloat(c[2]);
            4 === c.length && (d += parseInt(c[3], 10) / a.ue);
            return d
        }, ne = function (a) {
            var b = "";
            a = a.childNodes;
            for (var c = 0; c < a.length; c++) {
                var d = a[c];
                d.nodeType === Node.TEXT_NODE ? d.textContent.match(
                    /^[\n|\r|\s]*$/) || (b += d.textContent) :
                    "span" === d
                    .nodeName ? b += ne(d) : "br" === d.nodeName &&
                    (b +=
                    "\n")
            }
            return b
        };
    ke.prototype.parse = function (a, b) {
        var c = [],
            d = (new DOMParser)
                .parseFromString(a, "text/xml");
        if (d = le(d.childNodes, "tt")) {
            var e = d.attributes.getNamedItem("ttp:frameRate");
            e && (this.ue = parseInt(e.value, 10));
            if (d = le(d.childNodes, "body"))
                if (d = le(d.childNodes, "div"))
                    for (e = 0; e < d.childNodes.length; e++) {
                        var f = d.childNodes[e];
                        if ("p" === f.nodeName) {
                            var g = null,
                                l = null;
                            a = ne(f);
                            for (var k = 0; k < f.attributes.length; k++) {
                                var m = f.attributes[k];
                                "begin" === m.localName ? g = me(
                                    this, m.value) +
                                    b : "end" === m.localName &&
                                    (l = me(
                                        this, m.value) +
                                    b)
                            }
                            a && null !== g && null !== l && c.push(
                                new TextTrackCue(
                                    g, l, a))
                        }
                    }
        }
        return c
    };
    var oe = function () {}, pe = /[\r\n|\r|\n]{2,}/,
        qe = /\r\n|\r|\n/,
        re = /MPEGTS:([\d]*)/,
        se = /LOCAL:([\d]{2}:?[\d]{2}:[\d]{2}.[\d]{3})/,
        te =
            /([\d]{2}:?[\d]{2}:[\d]{2}.[\d]{3})[\t ]+--\x3e[\t ]+([\d]{2}:?[\d]{2}:[\d]{2}.[\d]{3})/;
    oe.prototype.parse = function (a, b) {
        for (var c = a.split(pe), d = 0, e = 0, f = c[0].split(qe),
                g = 0; g <
            f.length; g++)
            if (0 === f[g].indexOf("X-TIMESTAMP-MAP")) {
                var l = f[g].match(se);
                l && (d = ue(l[1]));
                (l = f[g].match(re)) && (e = parseInt(l[1], 10) /
                    9E4);
                break
            }
        d = e - d + b;
        e = [];
        for (f = 1; f < c.length; f++) {
            for (var k = c[f], g = d, m = null, k = k.split(qe),
                    n = void 0,
                    n = 0; n < k.length && !(m = k[n].match(te)); n++
            );
            m ? (l = ue(m[1]), m = ue(m[2]), k = k.slice(n + 1)
                .join("\n"), g = new TextTrackCue(l + g, m + g, k)
            ) : g =
                null;
            g && e.push(g)
        }
        return e
    };
    var ue = function (a) {
        var b = 0;
        a = a.split(":");
        for (var c = 0; c < a.length; c++) b = 60 * b +
            parseFloat(a[c]);
        return b
    };
    var ve = function (a) {
        this.Rb = a.getMediaElement()
            .addTextTrack("captions");
        this.H = null;
        this.f = a;
        this.Bc = null
    };
    w(ve, C);
    h = ve.prototype;
    h.r = function () {
        this.Ab(!1);
        this.H && (this.H.dispose(), this.H = null)
    };
    h.abort = function () {};
    h.clear = function () {
        for (var a = this.Rb.cues; 0 < a.length;) this.Rb.removeCue(
            a[0])
    };
    h.ub = function () {
        return null
    };
    h.updating = function () {
        return !1
    };
    h.parse = function (a, b) {
        for (var c = this.Bc.parse(a, b); 0 < c.length;) this.Rb.addCue(
            c.pop())
    };
    h.append = function (a, b) {
        this.parse(decodeURIComponent(escape(String.fromCharCode.apply(
            null,
            a))), b)
    };
    h.Ab = function (a, b, c) {
        a ? (this.Rb.mode = "showing", this.Bc || ("ttml" === b ?
                this.Bc =
                new ke : "webvtt" === b && (this.Bc = new oe)), c &&
            (this.H ||
                (this.H = new Q), a = new K, a.url = c, this.f.updateCaptionsRequestInfo(
                    a), this.H.load(a, this))) : (this.clear(),
            this.Rb.mode =
            "disabled")
    };
    h.bb = function (a) {
        a && this.parse(a, 0)
    };
    var we = function (a) {
        H.call(this);
        this.Za = null;
        this.Kc = a
    };
    w(we, H);
    we.prototype.Yc = function () {
        this.Za && (this.Za.onprogress = null);
        this.Za = we.A.Yc.call(this);
        this.Za.onprogress = this.Kc;
        return this.Za
    };
    we.prototype.r = function () {
        this.Za && (this.Za.onprogress = null);
        we.A.r.call(this)
    };
    var xe = function (a, b, c, d, e) {
        this.a = B("cast.player.core.SegmentManager");
        this.sa = a;
        this.f = b;
        this.h = c;
        this.Oa = new ge(b, c, d, this);
        this.n = d;
        var f = c.getStreamInfo(d);
        0 === f.mimeType.indexOf("text") ? (this.ta = new ve(b),
            this.ta.Ab(!
                0, f.codecs)) : this.ta = new ie(a, c, d, e);
        this.j = 1;
        this.eb = !1;
        this.wd = 0;
        this.zb = !1;
        this.Z = 0;
        this.w = new K;
        this.c = new we(this.Kc.bind(this));
        Qc(this.c);
        F(this.c, "success", this.Ca, !1, this);
        F(this.c, "error", this.R, !1, this);
        F(this.c, "timeout", this.R, !1, this)
    };
    w(xe, C);
    h = xe.prototype;
    h.r = function () {
        this.ta.dispose();
        G(this.c, "success", this.Ca, !1, this);
        G(this.c, "error", this.R, !1, this);
        G(this.c, "timeout", this.R, !1, this);
        this.c.dispose();
        xe.A.r.call(this)
    };
    h.ub = function () {
        return this.ta.ub()
    };
    h.reset = function () {
        D(this.a, this.n + ": reset");
        this.c.abort();
        this.eb = !1;
        this.Z = 0;
        this.zb = !1;
        this.j = 1;
        this.ta.clear();
        this.sa.tc()
    };
    h.Ca = function (a) {
        var b = this.Oa;
        b.gb = 0;
        b.Zb = 0;
        b.Yb++;
        this.h.yc(this.n, $c(a.target), this);
        this.Z = 0;
        this.zb = !1
    };
    h.R = function () {
        this.eb = !1;
        var a = this.Oa;
        a.ac = a.gb;
        a.bc = a.gb;
        a.gb = 0;
        a.Zb = 0;
        a.Yb = 3;
        he(this.Oa) ? (this.zb = !0, this.Z = 0) : (this.Z++, 3 <
            this.Z &&
            (this.j = -1, this.f.onError(3, new L(this.w.url,
                this.c.Da, Zc(
                    this.c)))))
    };
    h.Kc = function (a) {
        var b = this.Oa,
            c = (new Date)
                .getTime() - this.wd;
        a = a.loaded;
        var d = 8E3 * a / c;
        b.Zb++;
        b.gb = (d + b.gb) / b.Zb;
        b.ac = 0.9 * d + (1 - 0.9) * b.ac;
        b.bc = 0.6 * d + 0.4 * b.bc;
        b.f.trackBandwidth(b.n, c, a)
    };
    h.sb = function (a) {
        if (2 === this.j) {
            var b = this.h.wc(this.n);
            a = b.time - a;
            this.eb || 0 !== this.Z || this.zb || (a += b.duration);
            return a
        }
        return 0
    };
    h.Nb = function () {
        this.ta.abort();
        this.sa.tc()
    };
    var ye = function (a, b, c) {
        a.ta.append(b, c);
        a.eb = !1;
        a.sa.tc()
    }, ze = function (a) {
            a.eb = !0;
            a.wd = (new Date)
                .getTime();
            a.h.updateSegmentRequestInfo(a.n, a.w);
            a.f.updateSegmentRequestInfo(a.w);
            a.w.url && (a.c.xb = a.w.withCredentials, a.c.ra =
                Math.max(0,
                    a.w.timeoutInterval), a.c.send(a.w.url, void 0,
                    void 0,
                    a.w.headers))
        };
    xe.prototype.active = function () {
        return 0 < this.j || this.ta.updating()
    };
    xe.prototype.ed = function (a) {
        if (!this.eb && !this.Oa.fc)
            if (0 < this.Z || this.zb) ze(this);
            else if (he(this.Oa), !this.Oa.fc) {
            if (this.h.Td(this.n)) {
                var b = this.h.dd(this.n);
                if (b) this.ta.append(b, 0);
                else {
                    ze(this);
                    return
                }
            }
            if (2 === this.j) {
                if (this.h.lb(this.n)) {
                    this.j = 0;
                    return
                }
                a = this.h.hc(this.n)
            }
            else this.h.Sd(this.n) ? (D(this.a, this.n +
                    ": seek " + a),
                this.j = (a = this.h.seek(this.n, a)) ? 2 : 0) :
                a = !1;
            a && ze(this)
        }
    };
    var Ae = function (a) {
        this.sa = this.h = null;
        this.f = a;
        this.I = [];
        this.p = new MediaSource;
        this.Ob = 0
    };
    h = Ae.prototype;
    h.ed = function (a, b) {
        this.I[a].ed(b)
    };
    h.ub = function (a) {
        return this.I[a].ub()
    };
    h.active = function (a) {
        return this.I[a] ? this.I[a].active() : !1
    };
    h.sb = function (a, b) {
        return this.I[a].sb(b)
    };
    h.open = function (a, b) {
        this.h || (this.h = b, this.sa = a, this.Ob = this.h.getStreamCount(),
            this.update())
    };
    h.close = function () {
        for (var a = 0; a < this.Ob; a++) this.I[a] && this.I[a].dispose(),
        this.h.clear(a);
        this.I = [];
        this.Ob = 0;
        this.h = null
    };
    h.reset = function () {
        for (var a = 0; a < this.Ob; a++) this.I[a] && this.I[a].reset()
    };
    h.update = function () {
        if (this.sa && this.h)
            for (var a = 0; a < this.Ob; a++) {
                var b = this.h.isStreamEnabled(a);
                !b && this.I[a] ? (this.I[a].dispose(), this.I[a] =
                    null) :
                    b && !this.I[a] && (this.I[a] = new xe(this.sa,
                        this.f,
                        this.h, a, this.p))
            }
    };
    var Be = function () {};
    v("cast.player.api.PlayerCallbacks", Be);
    Be.prototype.tc = function () {};
    Be.prototype.de = function () {};
    var W = function (a) {
        this.a = B("cast.player.api.Player");
        D(this.a, "version 0.3.0");
        D(this.a, "revision 18");
        this.Fa = this.jb = null;
        this.da = new Ae(a);
        this.p = this.da.p;
        this.h = null;
        this.f = a;
        this.Qa = !1;
        this.Dd = this.Ce.bind(this);
        this.Cd = this.Be.bind(this);
        this.Fd = this.Ee.bind(this);
        this.Ed = this.De.bind(this);
        this.Ad = this.Lc.bind(this);
        this.zd = this.ze.bind(this);
        this.Bd = this.Ae.bind(this);
        this.Id = this.He.bind(this);
        this.Gd = this.Fe.bind(this);
        this.Hd = this.Ge.bind(this);
        this.ye = this.Ie.bind(this);
        this.Cb = !0;
        this.ib =
            this.dc = this.$b = this.g = null;
        this.Nc = !1
    };
    v("cast.player.api.Player", W);
    W.prototype.tc = function () {
        Ce(this, 0)
    };
    W.prototype.de = function (a, b) {
        this.ib && this.ib.postMessage({
            timeOffset: b,
            sourceData: a
        }, [a.buffer])
    };
    var De = function (a) {
        null !== a.jb && (clearTimeout(a.jb), a.jb = null)
    }, Ce = function (a, b) {
            null !== a.jb && clearTimeout(a.jb);
            a.jb = setTimeout(a.ye, b)
        };
    h = W.prototype;
    h.Ce = function () {
        D(this.a, "play");
        this.Cb || (this.Qa = !1)
    };
    h.Be = function () {
        D(this.a, "pause")
    };
    h.Ee = function () {
        D(this.a, "seeking");
        this.Nc || this.da.reset()
    };
    h.De = function () {
        D(this.a, "seeked");
        this.Nc = !1
    };
    h.Lc = function () {
        bc(this.a, "error");
        this.f.onError(1)
    };
    h.ze = function () {
        D(this.a, "ended")
    };
    h.Ae = function () {
        D(this.a, "loadedmetadata");
        null !== this.Fa && "open" === this.p.readyState && (this
            .g.currentTime =
            this.Fa, this.Fa = null, this.Nc = !0)
    };
    var Ee = function (a) {
        var b = a.h.Ac();
        0 < b && "open" === a.p.readyState && !a.p.duration && (a
            .p.duration =
            b)
    };
    h = W.prototype;
    h.He = function () {
        D(this.a, "sourceopen");
        this.h && (this.da.open(this, this.h), Ee(this), Ce(this,
            0))
    };
    h.Fe = function () {
        D(this.a, "sourceclose")
    };
    h.Ge = function () {
        D(this.a, "sourceended")
    };
    h.Ze = function (a) {
        this.dc.parse(a.data, 0)
    };
    h.Ie = function () {
        var a = 0,
            b = 0,
            c = 0,
            d = null === this.Fa ? this.g.currentTime : this.Fa;
        this.Cb = !1;
        var e, f = this.h.getStreamCount();
        for (e = 0; e < f; e++)
            if (this.h.isStreamEnabled(e)) {
                if (this.da.active(e)) {
                    var g = this.da.sb(e, d);
                    if (20 > g && (1 > g && 0 > this.h.getStreamInfo(
                            e)
                        .mimeType.indexOf("text") && (this.Cb = !
                            0),
                        this.da.ed(e, d), !this.g)) return;
                    10 <= g && b++;
                    a++
                }
                else b++;
                c++
            }
        this.g.paused ? this.Qa && b === c && (D(this.a,
                "auto resume"),
            this.Qa = !1, this.g.play()) : this.Cb && (D(this.a,
            "auto pause"), this.Qa = !0, this.g.pause());
        0 === a && "open" ===
            this.p.readyState && this.p.endOfStream();
        Ce(this, 200)
    };
    h.Pa = function () {
        Ee(this)
    };
    h.hb = function () {
	var u = window.URL.createObjectURL(this.p);
	console.log("p: " + JSON.stringify(this.p));
	console.log("u: " + u);
        this.p && (this.g.src = u)
    };
    var Fe = 0;
    W.prototype.load = function (a, b) {
        D(this.a, "load " + Fe);
        Fe++;
        this.g = this.f.getMediaElement();
        this.g.addEventListener("play", this.Dd, !1);
        this.g.addEventListener("pause", this.Cd, !1);
        this.g.addEventListener("seeking", this.Fd, !1);
        this.g.addEventListener("seeked", this.Ed, !1);
        this.g.addEventListener("error", this.Ad, !1);
        this.g.addEventListener("ended", this.zd, !1);
        this.g.addEventListener("loadedmetadata", this.Bd, !1);
        this.p.addEventListener("sourceopen", this.Id, !1);
        this.p.addEventListener("sourceended", this.Hd, !1);
        this.p.addEventListener("sourceclose", this.Gd, !1);
        this.Qa = this.g.autoplay;
        this.h = a;
        this.Fa = b || null;
        this.h.load(this, this, this.da);
        this.$b = new fe(this.f, this.h)
    };
    W.prototype.load = W.prototype.load;
    W.prototype.va = function () {
        Fe--;
        D(this.a, "unload " + Fe);
        this.g && (this.g.removeEventListener("play", this.Dd, !1),
            this.g.removeEventListener(
                "pause", this.Cd, !1), this.g.removeEventListener(
                "seeking",
                this.Fd, !1), this.g.removeEventListener("seeked",
                this.Ed, !
                1), this.g.removeEventListener("error", this.Ad, !
                1), this.g
            .removeEventListener("ended", this.zd, !1), this.g.removeEventListener(
                "loadedmetadata", this.Bd, !1), this.p.removeEventListener(
                "sourceopen", this.Id, !1), this.p.removeEventListener(
                "sourceended", this.Hd, !1), this.p.removeEventListener(
                "sourceclose", this.Gd, !1), this.h.va(), this.da
            .close(),
            this.$b.dispose(), this.g = null);
        De(this);
        this.Qa = !1
    };
    W.prototype.unload = W.prototype.va;
    W.prototype.reload = function () {
        null === this.Fa && (this.Fa = this.g.currentTime);
        this.g.paused || (this.Qa = !0);
        this.$b.reset();
        this.da.close();
        De(this);
        this.p && (this.g.src = window.URL.createObjectURL(this.p))
    };
    W.prototype.reload = W.prototype.reload;
    W.prototype.Gf = function () {
        return {
            underflow: this.Cb
        }
    };
    W.prototype.getState = W.prototype.Gf;
    W.prototype.sb = function (a) {
        return this.da.sb(a, this.g.currentTime)
    };
    W.prototype.getBufferDuration = W.prototype.sb;
    W.prototype.tb = function () {
        this.$b.tb()
    };
    W.prototype.startLicenseRequest = W.prototype.tb;
    W.prototype.Ab = function (a, b, c) {
        b ? ("608" === b && (a ? (this.ib = new Worker(
                    "media_player_ts608-debug.js"), this.ib.onmessage =
                this.Ze.bind(this)) : (this.ib.terminate(),
                this.ib =
                null), b = "webvtt"), this.dc || (this.dc = new ve(
                this.f)),
            this.dc.Ab(a, b, c)) : this.da.update()
    };
    W.prototype.enableCaptions = W.prototype.Ab;
    var Ie = function (a) {
        this.bd = [];
        for (this.duration = new N("mediaPresentationDuration",
                Ge); a && a
            .nodeType === a.COMMENT_NODE;) a = a.nextElementSibling;
        if (a)
            for (P(a.attributes, this), a = a.firstElementChild; null !==
                a; a =
                a.nextElementSibling) "Period" === a.nodeName &&
                this.bd.push(
                    new He(a))
    }, Ge = function (a) {
            if (a = a.match(Vb)) {
                var b = !(a[6] || a[7] || a[8]);
                if (b && !(a[2] || a[3] || a[4]) || b && a[5]) a =
                    null;
                else {
                    var b = parseInt(a[2], 10) || 0,
                        c = parseInt(a[3], 10) || 0,
                        d = parseInt(a[4], 10) || 0,
                        e = parseInt(a[6], 10) || 0,
                        f = parseInt(a[7], 10) || 0,
                        g = parseFloat(a[8]) ||
                            0;
                    a = a[1] ? new Wb(-b, -c, -d, -e, -f, -g) :
                        new Wb(b, c,
                            d, e, f, g)
                }
            }
            else a = null;
            return 60 * (60 * (24 * a.Q + a.J) + a.K) + a.L
        }, Je = function (a) {
            this.name = a;
            this.end = this.start = null;
            this.parse = this.V
        };
    Je.prototype.V = function (a) {
        a = a.split("-");
        this.start = parseInt(a[0], 10);
        this.end = parseInt(a[1], 10)
    };
    var Ke = function (a) {
        this.media = new O("media");
        P(a.attributes, this)
    }, Le = function (a) {
            this.Bf = new O("sourceURL");
            this.S = new Je("range");
            P(a.attributes, this)
        }, Me = function (a) {
            this.duration = new N("duration");
            this.$c = new N("timescale");
            this.wf = new Je("indexRange");
            P(a.attributes, this);
            this.lc = null;
            for (a = a.firstElementChild; null !== a; a = a.nextElementSibling)
                "Initialization" === a.nodeName && (this.lc = new Le(
                    a))
        }, Ne = function (a) {
            Me.call(this, a);
            this.i = [];
            for (a = a.firstElementChild; null !== a; a = a.nextElementSibling)
                "SegmentURL" ===
                    a.nodeName && this.i.push(new Ke(a))
        };
    w(Ne, Me);
    var Oe = function (a) {
        this.id = new O("id");
        this.Xb = new N("bandwidth");
        this.width = new N("width");
        this.height = new N("height");
        this.mimeType = new O("mimeType");
        this.codecs = new O("codecs");
        this.ja = new O("audioSamplingRate");
        P(a.attributes, this);
        this.Tc = this.Uc = this.url = null;
        for (a = a.firstElementChild; null !== a; a = a.nextElementSibling)
            "BaseURL" === a.nodeName ? this.url = a.textContent :
                "SegmentBase" === a.nodeName ? this.Tc = new Me(a) :
                "SegmentList" === a.nodeName && (this.Uc = new Ne(
                    a))
    }, Pe = function (a) {
            this.info = {};
            for (a = a.firstElementChild; null !==
                a; a = a.nextElementSibling)
                if (0 <= a.nodeName.indexOf("SystemURL")) {
                    var b = a.attributes.getNamedItem("type");
                    if (b) {
                        var c = this.info,
                            b = b.value;
                        if (b in c) throw Error(
                            'The object already contains the key "' +
                            b +
                            '"');
                        c[b] = a.textContent
                    }
                }
        }, Qe = function (a) {
            this.$c = new N("timescale");
            this.Y = new N("presentationTimeOffset");
            this.duration = new N("duration");
            this.Wc = new N("startNumber");
            this.media = new O("media");
            this.lc = new O("initialization");
            P(a.attributes, this)
        }, Re = function (a) {
            this.codecs = new O("codecs");
            this.mimeType =
                new O("mimeType");
            P(a.attributes, this);
            this.m = [];
            this.D = this.t = null;
            for (a = a.firstElementChild; null !== a; a = a.nextElementSibling)
                "Representation" === a.nodeName ? this.m.push(new Oe(
                    a)) :
                    "ContentProtection" === a.nodeName ? this.t =
                    new Pe(a) :
                    "SegmentTemplate" === a.nodeName && (this.D =
                        new Qe(a));
            for (a = 0; a < this.m.length; a++) {
                var b = this.m[a];
                this.mimeType.value && (b.mimeType = this.mimeType);
                this.codecs.value && (b.codecs.value = this.codecs
                    .value);
                "avc1" === b.codecs.value && (b.codecs.value =
                    "avc1.4d40")
            }
        }, He = function (a) {
            this.start =
                new N("start", Ge);
            this.duration = new N("duration", Ge);
            P(a.attributes, this);
            this.l = [];
            for (a = a.firstElementChild; null !== a; a = a.nextElementSibling)
                "AdaptationSet" === a.nodeName && this.l.push(new Re(
                    a))
        };
    var X = function (a) {
        R.call(this, a);
        this.ca = {}
    };
    w(X, R);
    X.prototype.ad = function () {
        var a = [];
        Na(this.ca, function (b, c) {
            a.push(c)
        });
        return a
    };
    X.prototype.updateLicenseRequestInfo = function (a) {
        if (this.ca && a.protectionSystem) {
            a.headers = {};
            a.headers["content-type"] = "text/xml;charset=utf-8";
            var b;
            b = this.ca;
            var c = a.protectionSystem;
            if (b = c in b ? b[c] : void 0) a.url = b
        }
    };
    var Se = function (a, b, c) {
        var d = b.wf;
        null !== d.start && null !== d.end && (c.S = {
            start: d.start,
            end: d.end
        });
        if (b = b.lc) d = b.S, d = null !== d.start && null !== d
            .end ? {
                start: d.start,
                end: d.end
        } : null, (b = b.Bf.value) && (b = Ad(a, b)), c.init = {
            url: b,
            S: d
        }
    };
    h = X.prototype;
    h.fd = function (a) {
        if (0 !== a.bd.length) {
            a.duration.value && (this.duration = a.duration.value);
            a = a.bd[0].l;
            for (var b = 0; b < a.length; b++) {
                var c = a[b],
                    d;
                if (d = c.t) t: {
                    d = this.ca;
                    var e = void 0;
                    for (e in d) {
                        d = !1;
                        break t
                    }
                    d = !0
                }
                d && (this.ca = c.t.info);
                d = c.m;
                var f = d[0],
                    e = 0 === f.mimeType.value.indexOf("audio"),
                    g = 0 === f.mimeType.value.indexOf("video");
                if (e || g) {
                    var e = e ? 1 : 2,
                        g = 0,
                        l = null;
                    if (c.D) var c = c.D,
                    k = c.$c.value || 1, g = -(c.Y.value || 0) /
                        k, l = {
                            duration: (c.duration.value || 0) / k,
                            Wc: c.Wc.value || 0,
                            url: Ad(this, c.media.value),
                            init: Ad(this,
                                c.lc.value)
                    };
                    c = {
                        type: e,
                        enabled: !1,
                        aa: !0,
                        index: -1,
                        N: -1,
                        m: [],
                        Y: g,
                        lang: null,
                        mimeType: f.mimeType.value || "",
                        codecs: f.codecs.value || ""
                    };
                    c.D = l;
                    for (g = 0; g < d.length; g++) {
                        f = d[g];
                        l = {
                            type: e,
                            u: f.Xb.value || 0,
                            id: f.id.value,
                            i: [],
                            url: Ad(this, f.url),
                            S: null,
                            init: null,
                            t: null
                        };
                        f.Tc && Se(this, f.Tc, l);
                        if (f.Uc) {
                            var m = f.Uc;
                            Se(this, m, l);
                            for (var f = 0, k = m.$c.value || 1,
                                    k = (m.duration
                                        .value || 0) / k, m = m.i,
                                    n = 0; n <
                                m.length; n++) {
                                var r = {
                                    time: f,
                                    duration: k,
                                    url: Ad(this, m[n].media.value)
                                };
                                l.i.push(r);
                                f += k
                            }
                        }
                        c.m.push(l)
                    }
                    this.l.push(c)
                }
            }
        }
    };
    h.bb = function (a) {
        var b = null;
        a && (a = (new DOMParser)
            .parseFromString(a, "text/xml"), b = new Ie(a.firstChild)
        );
        if (b) this.fd(b), Bd(this), this.Ja.hb(), this.xa.Pa();
        else this.host.onError(3, xd(this.ob))
    };
    h.load = function (a, b, c) {
        X.A.load.call(this, a, b, c);
        this.ob.load(this.P, this)
    };
    h.seek = function (a, b) {
        var c = this.l[a];
        if (c.D) {
            var d = Math.floor(b / c.D.duration),
                e = Math.ceil(this.duration / c.D.duration);
            c.index = d < e ? d : e - 1;
            return !0
        }
        return X.A.seek.call(this, a, b)
    };
    h.hc = function (a) {
        var b = this.l[a];
        return b.D ? (a = b.index + 1, a < Math.ceil(this.duration /
                b.D.duration) ?
            (b.index = a, !0) : !1) : X.A.hc.call(this, a)
    };
    h.lb = function (a) {
        var b = this.l[a];
        return b.D ? b.index === Math.ceil(this.duration / b.D.duration) -
            1 : X.A.lb.call(this, a)
    };
    h.wc = function (a) {
        var b = this.l[a];
        return b.D ? {
            time: b.index * b.D.duration,
            duration: b.D.duration
        } : X.A.wc.call(this, a)
    };
    h.updateSegmentRequestInfo = function (a, b) {
        var c = this.l[a],
            d = c.m[c.N],
            e = c.index;
        if (c.D) {
            var f = c.D,
                g = c.aa ? f.init : f.url,
                g = g.replace("$RepresentationID$", d.id),
                g = g.replace("$Bandwidth$", d.u);
            c.aa || (g = g.replace("$Number$", (e + f.Wc)
                .toString()));
            b.url = g
        }
        else {
            var l = f = null,
                g = null;
            if (c.aa) {
                if (c = d.init) c.S ? (f = c.S.start, l = d.S.end,
                    g = d.url) :
                    g = c.url
            }
            else e < d.i.length && (g = d.i[e], d.S ? (f = g.offset,
                l = g.offset +
                g.size - 1, g = d.url) : g = g.url);
            b.url = g || "";
            null !== f && null !== l && (b.headers = {}, b.headers
                .Range =
                "bytes=" + f + "-" + l)
        }
    };
    h.yc = function (a, b, c) {
        var d = this.l[a];
        a = d.m[d.N];
        var e, f;
        if (d.aa) {
            f = 0;
            d.aa = !1;
            e = new DataView(b);
            for (var g = 0; g < b.byteLength;) {
                var l = e.getUint32(g + 4, !1);
                if (1936286840 == l || 1836019558 == l) break;
                g += e.getUint32(g, !1)
            }
            e = new Uint8Array(b.slice(0, g));
            if (!d.D && a.init.S) {
                t: {
                    d = new DataView(b);
                    for (g = 0; 1936286840 != d.getUint32(g + 4, !
                        1);)
                        if (g += d.getUint32(g, !1), g >= b.byteLength) {
                            d = null;
                            break t
                        }
                    l = d.getUint32(g, !1) + g;
                    if (l > b.byteLength) d = null;
                    else {
                        var k = d.getUint8(g + 8),
                            g = g + 12;
                        b = d.getUint32(g + 4, !1);
                        var g = g + 8,
                            m;
                        0 == k ? (m = d.getUint32(g, !1), k = d.getUint32(
                            g +
                            4, !1), g += 8) : (m = (d.getUint32(g, !
                                    1) <<
                                32) + d.getUint32(g + 4, !1), k =
                            (d.getUint32(
                                g + 8, !1) << 32) + d.getUint32(g +
                                12, !1),
                            g += 16);
                        for (var k = k + (l + 0), l = d.getUint16(
                                    g + 2, !1),
                                g = g + 4, n = [], r = 0; r < l; r++
                        ) {
                            var p = d.getUint32(g, !1) &
                                2147483647,
                                q = d.getUint32(g + 4, !1);
                            n.push({
                                time: m / b,
                                duration: q / b,
                                offset: k,
                                size: p
                            });
                            g += 12;
                            k += p;
                            m += q
                        }
                        d = n
                    }
                }
                a.i = d || []
            }
        }
        else f = d.Y, e = new Uint8Array(b);
        ye(c, e, f)
    };
    var Te = function (a, b) {
        this.a = B("cast.player.hls.AacParser");
        this.Vd = a;
        this.yb = b;
        this.ce = 10;
        this.qb = this.Wd = null;
        this.V()
    };
    h = Te.prototype;
    h.V = function () {
        var a = this.Vd;
        if (4801587 == (a[0] << 16 | a[1] << 8 | a[2])) var b = a
            .subarray(
                6, 10),
        a = a.subarray(10 + 2097152 * b[0] + 16384 * b[1] + 128 *
            b[2] + b[
                3]);
        for (var b = [], c = null; 0 < a.length;) {
            c = a.subarray(0, 9);
            if (255 != c[0] && 249 != c[1]) bc(this.a,
                "Not ADTS header"),
            c = null;
            else var d = c[2] >> 2 & 15,
            e = [96E3, 88200, 64E3, 48E3, 44100, 32E3, 24E3,
                22050, 16E3,
                12E3, 11025, 8E3], c = {
                profile: (c[2] >> 6 & 3) + 1,
                Xd: d,
                ja: d < e.length ? e[d] : 0,
                Re: (c[2] << 2 & 4) + (c[3] >> 6 & 3),
                Ye: c[1] & 1 ? 7 : 9,
                ie: ((c[3] & 3) << 11) + (c[4] << 3) + ((c[5] &
                    224) >> 5)
            };
            b.push(a.subarray(c.Ye,
                c.ie));
            a = a.subarray(c.ie)
        }
        this.ce = c ? 1024 * b.length / c.ja : 0;
        this.Wd = b;
        this.qb = c
    };
    h.ee = function (a) {
        if (!this.qb) return bc(this.a, "ADTS header is not set"),
            new Uint8Array(
                0);
        var b = this.Wd,
            c = Math.ceil(this.qb.ja / 1024),
            d = new ArrayBuffer(this.Vd.length + (700 + 500 *
                Math.ceil(b.length /
                    (1 * c)))),
            e = new Uint8Array(d),
            d = new DataView(d),
            f, c = 0,
            g = this.qb,
            l = this.yb.match("mp4a.67") ? 103 : 64,
            k = {
                type: 1,
                url: null,
                u: 0,
                i: [],
                S: null,
                init: null,
                id: null,
                t: null
            }, m = g.profile << 3 | g.Xd >> 1 & 7,
            g = g.Xd << 7 & 128 | g.Re << 3 & 120;
        k.vd = l;
        k.ua = [m, g];
        l = ae(k);
        k = l.length;
        700 < k && (m = this.a) && m.log(Db, "moov size(" + k +
            ") exceeded MAX_MOOV_SIZE (700)",
            void 0);
        e.set(l, c);
        f = c + k;
        c = Math.ceil(this.qb.ja / 1024);
        c *= 1;
        l = 1;
        a *= 1E7;
        for (k = Math.ceil(1024E7 / this.qb.ja); 0 < b.length;) {
            for (var g = b.splice(0, c), m = g.length, n = g, r = [],
                    p = 0; p <
                n.length; p++) r.push(n[p].length);
            var n = d,
                p = e,
                q = f,
                z = l,
                t = k,
                $ = a;
            f = q;
            q += 4;
            n.setUint32(q, 1836019558);
            var q = q + 4,
                aa = n,
                ma = q,
                q = U(aa, p, q, "mfhd", [0, 0, 0, 0, 0, 0, 0, 0]);
            aa.setUint32(ma + 12, z);
            aa = q;
            q = Fd(n, p, q, t, $, r);
            p = q - f;
            500 < p && (t = this.a) && t.log(Db, "moof size(" + p +
                ") exceeded MAX_MOOF_SIZE (500)", void 0);
            n.setUint32(f, p);
            f = V(n, aa + 8, "trun");
            n.setUint32(f +
                16, p + 8);
            f = q;
            n = d;
            p = e;
            q = 0;
            for (q += 8; 0 < g.length;) t = g.shift(), p.set(t, f +
                q), q +=
                t.length;
            n.setUint32(f, q);
            n.setUint32(f + 4, 1835295092);
            f += q;
            l++;
            a += m * k
        }
        return e.subarray(0, f)
    };
    h.he = function (a) {
        return a
    };
    h.fe = function (a) {
        return a + this.ce
    };
    h.ge = function () {
        return null
    };
    var Ve = function (a) {
        this.a = B("cast.player.hls.HlsParser");
        this.Pc = a;
        this.j = 0;
        this.v = Ue(0, 0, null, null);
        this.Rc = !1;
        this.Qc = null
    }, Ue = function (a, b, c, d) {
            return {
                Ib: a,
                url: "",
                Md: null,
                Ra: 0,
                duration: 0,
                Nd: !1,
                Le: null,
                keySystem: b,
                ec: c,
                mb: d
            }
        }, Xe = function (a, b) {
            for (var c = {
                    Oe: -1,
                    Hc: !1,
                    codecs: null,
                    C: [],
                    G: !0,
                    Pe: -1,
                    Jc: null,
                    Ne: !1,
                    i: [],
                    ka: []
                }, d = new Ve(b), e = a.split("\n"), f = 0; f < e
                .length; f++) {
                var g = d,
                    l = e[f];
                if (null !== l.match("^[^#](.*)"))
                    if (null !== l.match("^(\\s|\\r)*$")) g = c;
                    else if (3 != g.j && 4 != g.j) Y(g, "URI"), g =
                    null;
                else {
                    l =
                        l.replace(/(\r)/gm, "");
                    l.match(/^(?:[a-z]+:)?\/\//) || (l = qd(g.Pc,
                            l)
                        .toString());
                    if (3 == g.j) {
                        if (!g.Rc) {
                            for (var k = g.v, m = g.v.Ib, n = new Uint8Array(
                                    16), r = 15; 0 <= r; r--) n[r] =
                                m &
                                255, m >>= 8;
                            k.mb = n
                        }
                        g.v.url = l;
                        c.i.push(g.v);
                        g.v = Ue(g.v.Ib + 1, g.v.keySystem, g.v.ec,
                            g.v.mb)
                    }
                    else 4 == g.j && c.C.push({
                        url: l,
                        u: g.Qc.Xb,
                        codecs: g.Qc.codecs
                    });
                    g.j = 2;
                    g = c
                }
                else g = We(g, c, l);
                c = g;
                if (null === c) break
            }
            return c
        }, Y = function (a, b) {
            var c = a.a;
            c && c.log(Db, "Unexpected " + b + ": state " + a.j,
                void 0)
        }, We = function (a, b, c) {
            var d = null;
            if (null !== (d = c.match(
                "^#EXTINF:([0-9]+(.[0-9]+)?),(.*)"))) {
                if (2 !=
                    a.j && 1 != a.j) return Y(a, "EXTINF"), null;
                a.v.duration = parseFloat(d[1]);
                a.j = 3
            }
            else if (null !== (d = c.match(
                "^#EXT-X-BYTERANGE:(.*)"))) c =
                d[1].split("@"), d = parseInt(c[1], 10), a.v.Md = {
                    start: d,
                    end: d + parseInt(c[0], 10) - 1
            };
            else if (null !== c.match("^#EXTM3U")) {
                if (0 != a.j) return Y(a, "EXTM3U"), null;
                a.j = 1
            }
            else if (null !== (d = c.match(
                "^#EXT-X-STREAM-INF:(.*)"))) {
                if (1 != a.j && 2 != a.j) return Y(a,
                    "EXT-X-STREAM-INF"),
                null;
                b.Hc = !0;
                c = d[1];
                for (d = {
                    Xb: 0,
                    We: null,
                    codecs: null,
                    audio: null,
                    video: null,
                    ka: null
                };;) {
                    var e = c.match("BANDWIDTH=([0-9]+),?(.*)"),
                        f = c.match("PROGRAM-ID=([0-9]+),?(.*)"),
                        g = c.match('CODECS="([^"]*)",?(.*)'),
                        l = c.match('AUDIO="([^"]*)",?(.*)'),
                        k = c.match('VIDEO="([^"]*)",?(.*)'),
                        m = c.match('SUBTITLES="([^"]*)",?(.*)');
                    if (null !== e) c = e[2], d.Xb = parseInt(e[1],
                        10);
                    else if (null !== f) c = f[2], d.We = f[1];
                    else if (null !== g) c = g[2], d.codecs = g[1];
                    else if (null !== l) c = l[2], d.audio = l[1];
                    else if (null !== k) c = k[2], d.video = k[1];
                    else if (null !== m) c = m[2], d.ka = m[1];
                    else break
                }
                a.Qc = d;
                a.j = 4
            }
            else if (null !== (d = c.match(
                "^#EXT-X-VERSION:([0-9])"))) {
                if (1 != a.j) return Y(a,
                    "EXT-X-VERSION"), null;
                b.Oe = parseInt(d[1], 10);
                a.j = 1
            }
            else if (null !== (d = c.match(
                "^#EXT-X-PROGRAM-DATE-TIME:(.*)")))
                1 === a.j && (b.Jc = d[1]);
            else if (null !== (d = c.match(
                "^#EXT-X-TARGETDURATION:([0-9]+)"))) {
                if (1 != a.j) return Y(a, "EXT-X-TARGETDURATION"),
                    null;
                b.Pe = parseInt(d[1], 10)
            }
            else if (null !== (d = c.match(
                "^#EXT-X-MEDIA-SEQUENCE:([0-9]+)"))) {
                if (1 != a.j) return Y(a, "EXT-X-MEDIA-SEQUENCE"),
                    null;
                a.v.Ib = parseInt(d[1], 10);
                a.j = 1
            }
            else if (null !== (d = c.match("^#EXT-X-KEY:(.*)"))) {
                if (2 != a.j && 1 != a.j) return Y(a, "EXT-X-KEY"),
                null;
                e = c = d[1];
                for (a.Rc = !1;;)
                    if (c = e.match(
                            "METHOD=(NONE|AES-128|SAMPLE-AES),?(.*)"
                        ), d =
                        e.match('URI="([^"]*)",?(.*)'), e = e.match(
                            "IV=0(x|X)([0-9a-fA-F]+),?(.*)"),
                        null !== c) {
                        if ("NONE" == c[1]) a.v.keySystem = 0;
                        else if ("AES-128" == c[1]) a.v.keySystem =
                            1;
                        else if ("SAMPLE-AES" == c[1]) a.v.keySystem =
                            2;
                        else break;
                        e = c[2]
                    }
                    else if (null !== d) a.v.ec = qd(a.Pc, d[1])
                    .toString(), e = d[2];
                else {
                    if (null !== e) {
                        a.Rc = !0;
                        c = e[2];
                        if (32 < c.length) break;
                        a.v.mb = new Uint8Array(16);
                        d = 15;
                        for (e = c.length - 2; 0 <= e; e -= 2) a.v
                            .mb[d] =
                            parseInt(c.substr(e, 2),
                                16), d--
                    }
                    break
                }
            }
            else if (null !== (d = c.match("^#EXT-X-MEDIA:(.*)"))) {
                if (2 != a.j && 1 != a.j) return Y(a,
                    "EXT-X-MEDIA"), null;
                c = d[1];
                d = !1;
                f = e = null;
                g = c.match("TYPE=([^,]*)");
                null !== g && "SUBTITLES" === g[1] && (d = !0);
                g = c.match('URI="([^"]*)",?(.*)');
                null !== g && (e = qd(a.Pc, g[1])
                    .toString());
                g = c.match('LANGUAGE="([^"]*)",?(.*)');
                null !== g && (f = g[1]);
                (a = d && e ? {
                    url: e,
                    language: f
                } : null) && b.ka.push(a)
            }
            else if (null !== c.match("^#EXT-X-DISCONTINUITY")) {
                if (2 != a.j && 1 != a.j) return Y(a,
                    "EXT-X-DISCONTINUITY"),
                null;
                a.v.Nd = !0;
                a.j = 2
            }
            else if (null !==
                c.match("^#EXT-X-ENDLIST")) {
                if (2 != a.j && 1 != a.j) return Y(a,
                    "EXT-X-ENDLIST"),
                null;
                b.G = !1;
                b.Ne = !0;
                a.j = 2
            }
            return b
        };
    var Ye = function () {};
    v("cast.player.hls.PlaylistReadyCallback", Ye);
    Ye.prototype.Pa = function () {};
    var Ze = function (a, b, c, d) {
        this.a = B("cast.player.hls.Playlist");
        this.f = a;
        this.Db = b;
        this.Ea = c;
        this.u = d;
        this.language = null;
        this.G = !1;
        this.Ld = -1;
        this.i = [];
        this.H = new Q;
        this.w = new K;
        this.o = null;
        this.Ic = this.ic.bind(this)
    };
    w(Ze, C);
    h = Ze.prototype;
    h.r = function () {
        this.H.dispose();
        null !== this.o && (clearTimeout(this.o), this.o = null)
    };
    h.Ac = function () {
        return this.G ? -1 : this.Ld
    };
    h.setActive = function () {
        this.ic()
    };
    h.va = function () {
        this.i = [];
        this.H.abort();
        null !== this.o && (clearTimeout(this.o), this.o = null)
    };
    h.ic = function () {
        D(this.a, "update: " + this.Ea);
        this.w.url = this.Ea;
        this.f.updateManifestRequestInfo(this.w);
        this.H.load(this.w, this)
    };
    h.bb = function (a) {
        if (a) {
            if (a = Xe(a, this.Ea), null !== a && !a.Hc) {
                if (a.Jc) {
                    var b = new Date(a.Jc);
                    isNaN(b.getTime()) || new ac(b)
                }
                this.G = a.G;
                a = a.i;
                for (var c = b = 0; c < a.length; c++) a[c].Ra =
                    b, b += a[
                        c].duration;
                this.G || (this.Ld = b);
                var d = (new Date)
                    .getTime() / 1E3;
                if (this.G)
                    for (c = 0; c < a.length; c++) a[c].Le = d +
                        b;
                this.i = a;
                this.G && 0 < a.length && (a = 1E3 * a[0].duration,
                    D(this.a,
                        "update in: " + a), this.o = setTimeout(
                        this.Ic, a));
                this.Db.Pa(this)
            }
        }
        else this.f.onError(3, xd(this.H))
    };
    var $e = function () {
        this.ab = -1;
        this.M = [];
        this.je = !1
    };
    $e.prototype.update = function (a) {
        var b = a.i;
        if (0 !== b.length) {
            var c, d;
            d = b[0].Ib;
            for (c = 0; c < this.M.length && this.M[c].Ib !== d; c++)
            ;
            if (c === this.M.length) this.M = b;
            else {
                var e = this.M[c].Ra;
                for (d = 0; d < b.length; d++) b[d].Ra += e;
                this.M.splice(c, this.M.length - c);
                this.M = this.M.concat(b)
            }
            this.je = a.G
        }
    };
    $e.prototype.next = function () {
        var a = this.ab + 1;
        return a < this.M.length ? (this.ab = a, !0) : !1
    };
    $e.prototype.lb = function () {
        return !this.je && this.ab === this.M.length - 1
    };
    $e.prototype.seek = function (a) {
        for (var b = this.M.length - 1; 0 <= b; b--)
            if (a >= this.M[b].Ra) return this.ab = 0 < b ? b - 1 :
                0, !0;
        this.ab = -1;
        return !1
    };
    var af = function (a) {
        return 0 > a.ab ? null : a.M[a.ab]
    };
    var bf = function (a, b, c) {
        this.La = [];
        this.ka = [];
        this.codecs = null;
        this.f = a;
        this.H = new Q;
        this.w = new K;
        this.Ve = b;
        this.Db = c
    };
    w(bf, C);
    bf.prototype.load = function () {
        this.f.updateManifestRequestInfo(this.w);
        this.H.load(this.w, this)
    };
    bf.prototype.r = function () {
        this.H.dispose();
        var a, b = this.La.length;
        for (a = 0; a < b; a++) this.La[a].dispose();
        this.La = []
    };
    bf.prototype.bb = function (a) {
        if (a && this.w.url)
            if (a = Xe(a, this.w.url), null === a) this.f.onError(
                0);
            else {
                for (var b = !1, c = !1, d = 0; d < a.C.length; d++) {
                    var e = a.C[d].codecs;
                    e && (0 <= e.indexOf(",") || 0 > e.indexOf(
                            "mp4a") ? c = !
                        0 : b = !0)
                }
                if (c && b)
                    for (d = 0; d < a.C.length; d++) e = a.C[d].codecs, !
                        e ||
                        0 <= e.indexOf(",") || 0 > e.indexOf(
                            "mp4a") || a.C
                        .splice(d, 1);
                0 < a.C.length && (this.codecs = a.C[0].codecs);
                if (a.Hc)
                    for (b = 0; b < a.C.length; b++) this.La.push(
                        new Ze(
                            this.f, this.Db, a.C[b].url, a.C[b].u
                        ));
                else this.La.push(new Ze(this.f, this.Db, this.w.url,
                    0));
                for (b = 0; b < a.ka.length; b++) c = a.ka[b], d =
                    new Ze(
                        this.f, this.Db, c.url, 0), d.language =
                    c.language,
                this.ka.push(d);
                this.Ve.hb()
            }
            else this.f.onError(3, xd(this.H))
    };
    var cf = function (a) {
        this.b = a
    }, df = function (a, b) {
            var c = Math.floor(a / 95443.7176888889),
                d = 95443.7176888889 * (c - 1) + b,
                e = 95443.7176888889 * (c + 0) + b,
                c = 95443.7176888889 * (c + 1) + b,
                f = Math.abs(d - a),
                g = Math.abs(e - a),
                l = Math.abs(c - a),
                k = f;
            g < f && (d = e, k = g);
            l < k && (d = c);
            return d
        };
    cf.prototype.he = function (a) {
        for (var b = 0, c = {}, d = !1; 0 <= b && b < this.b.length;) {
            t: {
                if (!(0 > b))
                    for (; b < this.b.length; b++) {
                        var e = b + 188,
                            f = b + 376;
                        if (71 == this.b[b] && (e >= this.b.length ||
                            71 ==
                            this.b[e]) && (f >= this.b.length ||
                            71 ==
                            this.b[f])) break t
                    }
                b = -1
            }
            if (0 > b) break;
            e = ef(this, b);
            if (null === e) b++;
            else {
                0 == e.zc && (d = !0);
                if (d && 0 != e.zc && 0 != e.jd && (f = ff(this,
                    b + (188 -
                        e.vb), e.vb), null !== f)) {
                    var g = df(a, f.ke);
                    void 0 === c[f.Ma] && (c[f.Ma] = []);
                    c[f.Ma].push(g);
                    if (10 < c[f.Ma].length) break
                }
                b = 0 > e.offset ? b + 1 : b + 188
            }
        }
        a = null;
        for (var l in c)
            if (null ===
                a || c[l][0] < a) a = c[l][0];
        return a
    };
    cf.prototype.fe = function (a) {
        for (var b = this.b.length - 1, c = {}; 0 <= b && b <
            this.b.length;) {
            b = gf(this, b);
            if (0 > b) break;
            var d = ef(this, b);
            if (null === d) b--;
            else {
                if (0 != d.zc && 0 != d.jd && (d = ff(this, b + (
                        188 - d.vb),
                    d.vb), null !== d)) {
                    var e = df(a, d.ke);
                    void 0 === c[d.Ma] && (c[d.Ma] = []);
                    c[d.Ma].push(e);
                    if (10 < c[d.Ma].length) break
                }
                b -= 188
            }
        }
        a = null;
        for (var f in c)
            for (b = 0; b < c[f].length; b++)
                if (null === a || c[f][b] > a) a = c[f][b];
        return a + 0.033
    };
    cf.prototype.ge = function () {
        for (var a = this.b.length - 1; 0 <= a && a < this.b.length;) {
            a = gf(this, a);
            if (0 > a) break;
            var b = ef(this, a);
            if (null === b) a--;
            else {
                if (0 != b.zc && 0 != b.jd) {
                    t: {
                        var c = a + (188 - b.vb);
                        if (!(19 > b.vb || 0 != this.b[c + 0] ||
                                0 != this.b[
                                    c + 1] || 1 != this.b[c + 2]) &&
                            189 ===
                            this.b[c + 3] && (b = c + 9 + this.b[
                                    c + 8],
                                "I" === String.fromCharCode(this.b[
                                    b + 0]) &&
                                "D" === String.fromCharCode(this.b[
                                    b + 1]) &&
                                "3" === String.fromCharCode(this.b[
                                    b + 2]))
                        ) {
                            for (var c = b + 6, c = new Uint8Array(
                                        (this.b[
                                                c + 3] || (this.b[
                                                    c + 2] &
                                                255) << 7 || (
                                                this.b[c + 1] &
                                                255) << 14 || (
                                                this.b[c +
                                                    0] & 255) <<
                                            21) + 6), d = 0; d <
                                c
                                .length; d++) c[d] = this.b[b + d];
                            b = c;
                            break t
                        }
                        b = null
                    }
                    if (null !== b) return b
                }
                a -= 188
            }
        }
        return null
    };
    var gf = function (a, b) {
        if (b >= a.b.length) return -1;
        for (var c = b; 0 <= c; c--) {
            var d = c - 188,
                e = c - 376;
            if (71 == a.b[c] && (d >= a.b.length || 71 == a.b[d]) &&
                (e >=
                    a.b.length || 71 == a.b[e])) return c
        }
        return -1
    }, ef = function (a, b) {
            if (0 > b || b > a.b.length - 188 || 71 != a.b[b + 0])
                return null;
            var c = 0 != (a.b[b + 1] & 64),
                d = (a.b[b + 1] & 7) << 8 | a.b[b + 2],
                e = 184;
            if (0 != (a.b[b + 3] >> 4 & 2)) {
                var f = a.b[b + 4];
                if (183 < f) return null;
                e = e - 1 - f
            }
            return {
                offset: b,
                vb: e,
                jd: c,
                zc: d
            }
        }, ff = function (a, b, c) {
            if (19 > c || 0 != a.b[b + 0] || 0 != a.b[b + 1] || 1 !=
                a.b[b +
                    2]) return null;
            c = a.b[b + 3];
            if (192 !=
                (c & 224) && 224 != (c & 240)) return null;
            var d = a.b[b + 7] >> 6 & 3,
                e = 0,
                f = 0;
            2 == d ? (e = ((a.b[b + 9] & 14) << 13) / 1.373291015625,
                e +=
                (a.b[b + 10] << 6) / 1.373291015625, e += (a.b[b +
                        11] &
                    254) / 5.4931640625, e += a.b[b + 12] / 703.125,
                f = e +=
                (a.b[b + 13] & 254) / 18E4) : 3 == d && (e = ((a.b[
                        b + 9] &
                    14) << 13) / 1.373291015625, e += (a.b[b + 10] <<
                    6) /
                1.373291015625, e += (a.b[b + 11] & 254) / 5.4931640625,
                e +=
                a.b[b + 12] / 703.125, e += (a.b[b + 13] & 254) /
                18E4, f =
                ((a.b[b + 14] & 14) << 13) / 1.373291015625, f +=
                (a.b[b +
                    15] << 6) / 1.373291015625, f += (a.b[b + 16] &
                    254) /
                5.4931640625, f += a.b[b + 17] / 703.125, f += (a
                    .b[b +
                        18] & 254) / 18E4);
            return {
                Ma: c,
                ke: f,
                If: e
            }
        };
    var Z = function (a, b) {
        R.call(this, a);
        this.Od = 1 == b ? "audio/mp4" : "video/mp2t";
        this.Sc = "video/mp2t" == this.Od;
        this.yb = "avc1.640028,mp4a.40.2";
        this.ia = -1;
        this.pb = this.Ka = this.T = null;
        this.O = [new $e, null];
        this.na = null;
        this.Ua = 47721.8588444;
        this.uc = this.ya = this.Jb = this.Xc = this.fb = null;
        this.c = new H;
        Qc(this.c);
        F(this.c, "success", this.Yd, !1, this);
        F(this.c, "error", this.vc, !1, this);
        F(this.c, "timeout", this.vc, !1, this);
        this.Qe = this.Zd.bind(this);
        this.Se = this.Vc.bind(this);
        this.Hb = this.Mb = null
    };
    w(Z, R);
    var hf = function (a, b, c, d, e) {
        this.f = a;
        this.od = b;
        window.crypto.subtle.decrypt({
            name: "AES-CBC",
            iv: d
        }, c, e)
            .then(this.uf.bind(this), this.tf.bind(this))
    };
    hf.prototype.cancel = function () {
        this.f = null
    };
    hf.prototype.tf = function () {
        if (this.f) this.f.onError(2)
    };
    hf.prototype.uf = function (a) {
        this.f && this.od(a)
    };
    var jf = function (a, b, c) {
        this.f = a;
        this.od = b;
        window.crypto.subtle.importKey("raw", c, {
            name: "AES-CBC"
        }, !0, ["decrypt"])
            .then(this.Vc.bind(this), this.mf.bind(this))
    };
    jf.prototype.cancel = function () {
        this.f = null
    };
    jf.prototype.mf = function () {
        if (this.f) this.f.onError(2)
    };
    jf.prototype.Vc = function (a) {
        this.f && this.od(a)
    };
    Z.prototype.load = function (a, b, c) {
        this.gd = c;
        this.Ja = a;
        this.xa = b;
        this.T = new bf(this.host, this, this);
        this.T.load()
    };
    Z.prototype.va = function () {
        this.Mb && (this.Mb.cancel(), this.Mb = null);
        this.Hb && (this.Hb.cancel(), this.Hb = null);
        this.T && (this.T.dispose(), this.T = null);
        G(this.c, "success", this.Yd, !1, this);
        G(this.c, "error", this.vc, !1, this);
        G(this.c, "timeout", this.vc, !1, this)
    };
    Z.prototype.getStreamCount = function () {
        return this.T.ka.length + 1
    };
    v("cast.player.hls.Hls.prototype.getStreamCount", Z.prototype
        .getStreamCount);
    Z.prototype.enableStream = function (a, b) {
        if (0 < a) {
            this.pb && this.pb.va();
            var c;
            b ? (this.pb = this.T.ka[a - 1], this.pb.setActive(),
                c = new $e) :
                c = this.pb = null;
            this.O[a] = c
        }
    };
    v("cast.player.hls.Hls.prototype.enableStream", Z.prototype.enableStream);
    Z.prototype.isStreamEnabled = function (a) {
        return null !== this.O[a]
    };
    v("cast.player.hls.Hls.prototype.isStreamEnabled", Z.prototype
        .isStreamEnabled);
    Z.prototype.Sd = function (a) {
        var b = 0 === a || null !== this.ya;
        return null !== this.O[a] && 0 < this.O[a].M.length && b
    };
    Z.prototype.$d = function (a, b, c) {
        0 < a ? c.Nb() : (this.ya = null, this.ia = b, this.fb =
            c, this.Ka &&
            this.Ka.va(), this.Ka = this.T.La[this.ia], this.Ka.setActive()
        )
    };
    Z.prototype.getQualityLevel = function (a, b) {
        if (0 < a) return 0;
        if (void 0 === b) return this.ia;
        for (var c = 0, d = Number.MAX_VALUE, e = this.T.La, f =
                0; f < e.length; f++)
            if (b >= e[f].u) {
                var g = b - e[f].u;
                g < d && (c = f, d = g)
            }
        return c
    };
    v("cast.player.hls.Hls.prototype.getQualityLevel", Z.prototype
        .getQualityLevel);
    Z.prototype.getStreamInfo = function (a) {
        if (0 < a) return new vd("webvtt", "text", [0], this.T.ka[
            a - 1].language);
        a = [];
        for (var b = this.T.La, c = 0; c < b.length; c++) a.push(
            b[c].u);
        return new vd(this.yb, this.Od, a)
    };
    v("cast.player.hls.Hls.prototype.getStreamInfo", Z.prototype.getStreamInfo);
    Z.prototype.Vc = function (a) {
        this.Mb = null;
        this.Jb = a;
        this.uc && (kf(this, this.uc), this.uc = null)
    };
    Z.prototype.Yd = function (a) {
        this.Mb = new jf(this.host, this.Se, new Uint8Array($c(a.target)))
    };
    Z.prototype.vc = function () {
        this.host.onError(3, new L(this.P.url, this.c.Da, Zc(this
            .c)))
    };
    var kf = function (a, b) {
        var c = af(a.O[0]);
        c.mb && a.Jb && (a.Hb = new hf(a.host, a.Qe, a.Jb, c.mb,
            new Uint8Array(
                b)))
    };
    h = Z.prototype;
    h.Zd = function (a) {
        this.Hb = null;
        a = new Uint8Array(a);
        var b = this.Sc ? new cf(a) : new Te(a, this.yb),
            c = this.Ua,
            d = af(this.O[0]);
        if (null === this.ya || d.Nd) {
            var e = b.he(this.Ua);
            if (null === this.na) this.na = d.Ra;
            else t: {
                for (var d = this.gd.ub(0)
                    .buffered, f = this.na, g = 0; g < d.length; g++
                ) {
                    if (this.na >= d.start(g) && this.na <= d.end(
                        g) + 0.03)
                        break t;
                    d.end(g) < this.na && (f = d.end(g) + 0.03)
                }
                this.na = f
            }
            this.ya = this.na - e
        }
        this.Ua = b.fe(this.Ua);
        this.na = this.ya + this.Ua;
        (e = b.ge()) && this.host.processMetadata("ID3", e);
        b.ee && (a = b.ee(c));
        ye(this.Xc,
            a, this.ya);
        this.Xc = null
    };
    h.clear = function () {
        this.ya = this.Ka = null
    };
    h.hb = function () {
        this.T.codecs && (this.yb = this.T.codecs);
        this.Sc || (this.Ua = 0);
        this.Ja && this.Ja.hb()
    };
    h.Pa = function (a) {
        a === this.Ka ? (this.xa && (this.xa.Pa(), this.xa = null),
            this.fb &&
            (this.fb.Nb(), this.fb = null), this.O[0].update(a)) :
            a ===
            this.pb && this.O[1].update(a)
    };
    h.updateLicenseRequestInfo = function () {};
    h.Ac = function () {
        return this.Ka ? this.Ka.Ac() : -1
    };
    h.seek = function (a, b) {
        0 === a && (this.Ua = this.Sc ? 47721.8588444 : 0, this.na =
            this.ya =
            null);
        return this.O[a].seek(b)
    };
    h.hc = function (a) {
        return this.O[a].next()
    };
    h.lb = function (a) {
        return this.O[a].lb()
    };
    h.wc = function (a) {
        return (a = af(this.O[a])) ? {
            time: a.Ra,
            duration: a.duration
        } : {
            time: 0,
            duration: 0
        }
    };
    h.Td = function () {
        return !1
    };
    h.dd = function () {
        return null
    };
    h.updateSegmentRequestInfo = function (a, b) {
        var c = af(this.O[a]);
        1 === c.keySystem && this.P.url !== c.ec && (this.Jb =
            null, this.P
            .url = c.ec, this.host.updateLicenseRequestInfo(this.P),
            this.c
            .xb = this.P.withCredentials, this.c.ra = Math.max(0,
                this.P.timeoutInterval),
            this.c.send(this.P.url, void 0, void 0, this.P.headers)
        );
        var d = c.Md;
        d && (b.headers = {}, b.headers.Range = "bytes=" + d.start +
            "-" +
            d.end);
        b.url = c.url
    };
    h.yc = function (a, b, c) {
        0 < a ? null !== this.ya && ye(c, new Uint8Array(b), this
            .ya) : (
            this.Xc = c, 1 === af(this.O[a])
            .keySystem ? null === this.Jb ? this.uc = b : kf(this,
                b) :
            this.Zd(b))
    };
    var nf = function (a) {
        this.G = new wd;
        this.Fb = new N("TimeScale");
        this.duration = new N("Duration");
        P(a.attributes, this);
        this.Fb.value || (this.Fb.value = 1E7);
        this.C = [];
        this.t = null;
        for (a = a.firstElementChild; null != a; a = a.nextElementSibling)
            if ("StreamIndex" === a.nodeName) {
                var b = new lf(this, a);
                0 < b.ea.length && this.C.push(b)
            }
            else "Protection" === a.nodeName && (this.t = new mf(
                a.firstElementChild))
    }, of = function (a) {
            return "AACL" === a ? "mp4a.40.2" : "AACH" === a ?
                "mp4a.40.5" :
                "TTML" === a ? "ttml" : "H264" === a || "AVC1" ===
                a ?
                "avc1.4d40" : ""
        },
        pf = function (a) {
            for (var b = [], c = 0; c < a.length; c += 2) b.push(
                parseInt(a
                    .substr(c, 2), 16));
            return b
        }, qf = function (a) {
            this.name = a;
            this.value = null;
            this.parse = this.V
        };
    qf.prototype.V = function (a) {
        a = a.replace(/[{}-]/g, "");
        for (var b = new ArrayBuffer(a.length / 2), b = new Uint8Array(
                    b),
                c = 0; c < a.length; c += 2) b[c / 2] = parseInt(
            a.substr(c,
                2), 16);
        this.value = b
    };
    var rf = function () {
        this.name = "CodecPrivateData";
        this.Eb = this.kb = null;
        this.parse = this.V
    };
    rf.prototype.V = function (a) {
        a = a.split("00000001");
        3 === a.length && (this.kb = pf(a[1]), this.Eb = pf(a[2]))
    };
    var sf = function () {
        this.name = "CodecPrivateData";
        this.parse = function (a) {
            this.value = pf(a ? a : "1210")
        };
        this.value = null
    }, tf = function (a, b) {
            this.u = new N("Bitrate");
            this.gc = new O("FourCC", of, b)
        }, uf = function (a) {
            tf.call(this, 0, "ttml");
            P(a.attributes, this)
        };
    w(uf, tf);
    var vf = function (a) {
        tf.call(this, 0, "avc1.4d40");
        this.width = new N("MaxWidth");
        this.height = new N("MaxHeight");
        this.ua = new rf;
        P(a.attributes, this)
    };
    w(vf, tf);
    var wf = function (a) {
        tf.call(this, 0, "mp4a.40.2");
        this.ja = new N("SamplingRate");
        this.ua = new sf;
        P(a.attributes, this)
    };
    w(wf, tf);
    var lf = function (a, b) {
        this.type = new O("Type");
        this.url = new O("Url");
        this.name = new O("Name");
        this.lang = new O("Language");
        P(b.attributes, this);
        this.$ = 0;
        "video" === this.type.value ? this.$ = 2 : "audio" ===
            this.type.value ?
            this.$ = 1 : "text" === this.type.value && (this.$ =
                3);
        this.i = [];
        this.ea = [];
        for (var c = 0, d = b.firstElementChild; null != d; d = d
            .nextElementSibling)
            if ("QualityLevel" === d.nodeName) {
                var e = null;
                2 === this.$ ? e = new vf(d) : 1 === this.$ ? e =
                    new wf(d) :
                    3 === this.$ && (e = new uf(d));
                e && e.gc.value && this.ea.push(e)
            }
            else if ("c" ===
            d.nodeName) {
            (e = d.attributes.getNamedItem("t")) && (c = parseInt(
                e.value,
                10));
            var f = a.Fb.value ? a.Fb.value : 1,
                g = null,
                l;
            d.attributes.getNamedItem("d") ? (g = parseInt(d.attributes
                .d.value,
                10), l = g / f) : l = null;
            var k;
            k = (e = d.attributes.getNamedItem("r")) ? parseInt(e
                .value, 10) :
                1;
            for (e = 0; e < k; e++) {
                var m = {
                    time: c / f,
                    duration: l,
                    ae: c
                };
                this.i.push(m);
                g && (c += g)
            }
        }
        c = this.i.length - 1;
        for (e = 0; e < c; e++) m = this.i[e], d = this.i[e + 1],
            null ===
            m.duration && (m.duration = d.time - m.time)
    }, mf = function (a) {
            this.systemId = new qf("SystemID");
            P(a.attributes,
                this);
            this.url = this.Gb = null;
            this.Oc = 8;
            this.Ha = Cd(window.atob(a.textContent.trim()));
            a = (this.Ha.length - 10) / 2;
            for (var b = new Uint8Array(a), c = 0, d = 10; c < a &&
                31 <
                this.Ha[d]; c++, d += 2) b[c] = this.Ha[d];
            b = b.subarray(0, c);
            a = String.fromCharCode.apply(null, b);
            a = (new DOMParser)
                .parseFromString(a, "text/xml");
            if (0 < a.childNodes.length && (a = a.childNodes[0].firstElementChild))
                for (a = a.firstElementChild; null != a; a = a.nextElementSibling)
                    "LA_URL" === a.nodeName ? this.url = a.textContent :
                        "KID" === a.nodeName && (this.Gb = Cd(
                            window.atob(a
                                .textContent)))
        };
    var xf = function (a) {
        R.call(this, a);
        this.o = null;
        this.Ic = this.ic.bind(this);
        this.ca = null
    };
    w(xf, R);
    var yf = function (a, b) {
        for (var c = 0; c < a.length; c++) a[c].id = b + c
    };
    h = xf.prototype;
    h.fd = function (a) {
        var b, c, d, e;
        (b = a.t) && b.systemId.value && b.Ha && b.Gb && (this.ca = {
            systemId: b.systemId.value,
            Ha: b.Ha,
            Gb: b.Gb,
            url: b.url,
            Oc: b.Oc
        });
        this.duration = a.duration.value ? a.duration.value / a.Fb
            .value :
            0;
        for (b = 0; b < a.C.length; b++) {
            var f = a.C[b];
            yf(f.i, 0);
            if (2 === f.$) {
                var g = f.ea[0];
                d = {
                    type: 2,
                    enabled: !1,
                    aa: !0,
                    m: [],
                    Y: -f.i[0].time,
                    lang: f.lang.value,
                    mimeType: "video/mp4",
                    codecs: g.gc.value + g.ua.kb[3].toString(16)
                        .toLowerCase(),
                    index: -1,
                    N: -1
                };
                for (c = 0; c < f.ea.length; c++) {
                    g = f.ea[c];
                    e = {
                        type: 2,
                        url: f.url.value,
                        u: g.u.value ||
                            0,
                        i: f.i,
                        id: f.name.value,
                        init: null,
                        S: null,
                        t: null
                    };
                    e.t = this.ca;
                    var l = e;
                    l.width = g.width.value;
                    l.height = g.height.value;
                    l.kb = g.ua.kb;
                    l.Eb = g.ua.Eb;
                    d.m.push(e)
                }
                this.l.push(d)
            }
            else if (1 === f.$) {
                d = {
                    type: 1,
                    enabled: !1,
                    aa: !0,
                    m: [],
                    Y: -f.i[0].time,
                    lang: f.lang.value,
                    mimeType: "audio/mp4",
                    codecs: f.ea[0].gc.value || "",
                    index: -1,
                    N: -1
                };
                for (c = 0; c < f.ea.length; c++) g = f.ea[c], e = {
                    type: 1,
                    url: f.url.value,
                    u: g.u.value || 0,
                    i: f.i,
                    id: f.name.value,
                    S: null,
                    init: null,
                    t: null
                }, e.t = this.ca, l = e, l.ua = g.ua.value, l.ja =
                    g.ja.value,
                l.vd = 64, d.m.push(e);
                this.l.push(d)
            }
            else if (3 === f.$) {
                d = {
                    type: 3,
                    enabled: !1,
                    aa: !1,
                    m: [],
                    Y: 0,
                    lang: f.lang.value,
                    mimeType: "text/mp4",
                    codecs: f.ea[0].gc.value,
                    index: -1,
                    N: -1
                };
                for (c = 0; c < f.ea.length; c++) e = {
                    type: 3,
                    u: f.ea[c].u.value || 0,
                    i: f.i,
                    id: f.name.value,
                    url: f.url.value,
                    S: null,
                    init: null,
                    t: null
                }, d.m.push(e);
                this.l.push(d)
            }
        }
        this.G = a.G.value || !1
    };
    h.load = function (a, b, c) {
        xf.A.load.call(this, a, b, c);
        this.ob.load(this.P, this)
    };
    h.va = function () {
        xf.A.va.call(this);
        null !== this.o && (clearTimeout(this.o), this.o = null)
    };
    h.ic = function () {
        this.host.updateManifestRequestInfo(this.P);
        this.ob.load(this.P, this)
    };
    h.bb = function (a) {
        var b = null;
        if (a) {
            a = (new DOMParser)
                .parseFromString(a, "text/xml");
            for (var c = 0; c < a.childNodes.length; c++)
                if ("SmoothStreamingMedia" === a.childNodes[c].nodeName) {
                    b = new nf(a.childNodes[c]);
                    break
                }
        }
        if (b) {
            if (this.Ja) this.fd(b), Bd(this), this.Ja.hb(), this
                .Ja = null;
            else {
                var d;
                for (a = 0; a < b.C.length; a++)
                    for (var e = b.C[a], c = 0; c < this.l.length; c++) {
                        var f = this.l[a];
                        if (e.lang.value === f.lang && (1 === e.$ &&
                            1 ===
                            f.type || 2 === e.$ && 2 === f.type ||
                            3 ===
                            e.$ && 3 === f.type)) {
                            var g = e.i,
                                l = f.m[0].i.slice(f.index),
                                k = l[l.length -
                                    1].id + 1,
                                m = l[l.length - 1].time;
                            for (d = 0; d < g.length && !(g[d].time >
                                m); d++)
                            ;
                            d === g.length ? g = l : (g = g.slice(
                                d), yf(g,
                                k), g = l.concat(g));
                            for (d = f.index = 0; d < f.m.length; d++)
                                f.m[
                                    d].i = g
                        }
                    }
            }
            this.xa && (this.xa.Pa(), this.xa = null);
            this.G && (this.o = setTimeout(this.Ic, 1E3))
        }
        else this.host.onError(3, xd(this.ob))
    };
    h.ad = function () {
        return ["playready"]
    };
    h.updateLicenseRequestInfo = function (a) {
        a.headers = {};
        a.headers["content-type"] = "text/xml;charset=utf-8";
        a.url = this.ca.url
    };
    h.dd = function (a) {
        a = this.l[a];
        var b = a.m[a.N];
        a.aa = !1;
        return ae(b)
    };
    h.updateSegmentRequestInfo = function (a, b) {
        var c = this.l[a],
            d = c.index,
            c = c.m[c.N],
            e = c.url,
            e = e.replace("{bitrate}", c.u.toString()),
            e = e.replace("{start time}", c.i[d].ae.toString());
        b.url = Ad(this, e)
            .toString()
    };
    h.yc = function (a, b, c) {
        a = this.l[a];
        var d = a.index,
            e = a.m[a.N].i;
        if (3 === a.type) {
            var f = new DataView(b);
            a = V(f, 0, "mdat");
            f = f.getUint32(a);
            a = new Uint8Array(b.slice(a + 8, a + f));
            ye(c, a, e[d].time)
        }
        else {
            var f = this.ca ? !0 : !1,
                g = e[d].ae || 0,
                l = [0, 0, 0, 20, 116, 102, 100, 116, 1, 0, 0, 0],
                e = l.length + 8,
                k = new DataView(b),
                m, n, r = V(k, 0, "mdat"),
                p;
            p = V(k, 0, "moof");
            p = V(k, p + 8, "traf");
            p = V(k, p + 8, "trun");
            0 === (k.getUint32(p + 8) & 1) ? (m = !1, n = 4) : (m = !
                0, n =
                0);
            var d = new ArrayBuffer(b.byteLength + e + n),
                q = new Uint8Array(d),
                z = new DataView(d),
                t = 0,
                t = V(k, 8, "traf"),
                t = V(k, t + 8, "tfhd");
            k.setUint32(t + 12, 1);
            var $ = e + n,
                t = Xd(k, 0, "moof", $),
                t = Xd(k, t + 8, "traf", $),
                t = V(k, t + 8, "trun");
            if (k.getUint32(t + 8) & 1) {
                var $ = t + 16,
                    aa = k.getUint32($);
                k.setUint32($, aa + e)
            }
            q.set(new Uint8Array(b, 0, t));
            q.set(l, t);
            z.setUint32(t + 12, g / 4294967295 & 4294967295);
            z.setUint32(t + 16, g & 4294967295);
            g = t + e;
            m ? q.set(new Uint8Array(b, t, b.byteLength - t), t +
                e) : (m =
                k.getUint32(p), z.setUint32(g, m + 4), m = k.getUint32(
                    p +
                    4), z.setUint32(g + 4, m), m = k.getUint32(p +
                    8), z.setUint32(
                    g + 8, m | 1), k = k.getUint32(p + 12), z.setUint32(
                    g +
                    12, k), q.set(new Uint8Array(b,
                    t + 16, b.byteLength - t - 16), g + 20));
            z.setUint32(g + 16, e + n + r + 8);
            if (f) t: {
                k = new DataView(d);
                r = z = m = 0;
                n = k.getUint32(m);
                m = V(k, m + 8, "traf");
                m = V(k, m + 8, "trun");
                z = k.getUint32(m + 12);
                for (b = [2721664850, 1520127764, 2722393154,
                    2086964724];;) {
                    m = V(k, m, "uuid");
                    if (m === k.byteLength) {
                        d = new Uint8Array(d);
                        break t
                    }
                    if (k.getUint32(m + 8) === b[0] && k.getUint32(
                            m + 12) ===
                        b[1] && k.getUint32(m + 16) === b[2] && k
                        .getUint32(
                            m + 20) === b[3]) break;
                    else m += k.getUint32(m)
                }
                b = k.getUint8(m + 27);
                p = !1;
                if (2 !== b && 0 !== b) throw "uuid flags expected is 0x02 or 0x00 but found: " +
                    b;
                2 === b && (p = !0);
                b = k.getUint32(m + 28);
                if (z !== b) throw "Samples count does not match " +
                    z +
                    " " + b;
                r = k.getUint32(m) - 32;
                b = new ArrayBuffer(d.byteLength + 200);
                q = new Uint8Array(b);
                f = new DataView(b);
                q.set(new Uint8Array(d, 0, m));
                e = m;
                l = m + 32;
                m = V(k, 0, "mdat");
                g = k.getUint32(m);
                t = z;
                if (p) {
                    for (var $ = new Uint8Array(t), ma = 0, ma =
                            0, aa = l,
                            oc = 0; oc < t; oc++) ma = k.getUint16(
                        aa + 8),
                    ma = 10 + 6 * ma, $[oc] = ma, aa += ma;
                    k = $
                }
                else k = new Uint8Array(0);
                e = $d(f, q, e, z, k, p);
                e = Zd(f, q, e);
                if (p) {
                    for (p = z = 0; p < k.length; p++) z += k[p];
                    if (z !== r) throw "Samples size does not match " +
                        z + " " + r;
                }
                else if (8 * z !== r) throw "Samples size does not match " +
                    8 * z + " " + r;
                z = new Uint8Array(d, l, r);
                k = new Uint8Array(d, m + 8, g - 8);
                d = e - n;
                n = e;
                e = Yd(f, q, e, z, k);
                n = n + 8 + r;
                r = Xd(f, 0, "moof", d);
                r = Xd(f, r + 8, "traf", d);
                r = V(f, r + 8, "trun");
                f.getUint32(r + 8) & 1 && f.setUint32(r + 16, n);
                d = new Uint8Array(b, 0, e)
            }
            else d = new Uint8Array(d);
            ye(c, d, a.Y)
        }
    };
    v("cast.player.api.CreateDashStreamingProtocol", function (a) {
        return new X(a)
    });
    v("cast.player.api.CreateHlsStreamingProtocol", function (a,
        b) {
        return new Z(a, b)
    });
    v("cast.player.api.CreateSmoothStreamingProtocol", function (
        a) {
        return new xf(a)
    });
})
    .call(window);
